Return-Path: From: "Bag, Amit K" To: Marcel Holtmann CC: "linux-bluetooth@vger.kernel.org" , "Srivatsa, Ravishankar" Subject: RE: [PATCH] Bluetooth: btusb: Release RF resource on BT shutdown Date: Thu, 2 Aug 2018 11:36:47 +0000 Message-ID: Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Sender: linux-bluetooth-owner@vger.kernel.org List-ID: SGkgTWFyY2VsLA0KDQo+IEhpIEFtaXQsDQo+DQo+ID4gSW4gY2FzZSBvZiBCVCB0dXJuIG9mZiBm cm9tIFVJIGl0IGlzIHNhZmUgdG8gYWRkIEhDSSByZXNldCBjb21tYW5kIA0KPiA+IHdoaWNoIHdp bGwgbWFpbnRhaW4gdGhlIGNvbnRyb2xsZXIgc3RhdGUuDQo+DQo+IHRoaXMgbmVlZHMgdG8gYmUg YSBiaXQgbW9yZSBkZXRhaWxzIHNpbmNlIGhkZXYtPnNodXRkb3duIGhhbmRsaW5nIGlzIHJlYWxs eSBvbmx5IGZvciB0aGUgb2xkZXIgSW50ZWwgY29udHJvbGxlcnMuDQoNCj4gQWxzbyBJIGFtIGZh aWxpbmcgdG8gc2VlIHdoeSBIQ0kgUmVzZXQgaGVscHMgb3Igd2hhdCBpdCBkb2VzIGhlcmUuIEl0 IGlzIGdvaW5nIHRvIGJlIGNhbGxlZCBhZ2FpbiBvbiBoZGV2LT5vcGVuIHRoZSBuZXh0IHRpbWUg dGhlIGNvbnRyb2xsZXIgaXMgYWN0aXZhdGVkLg0KPg0KPiA+IA0KPiA+IFNpZ25lZC1vZmYtYnk6 IEFtaXQgSyBCYWcgPGFtaXQuay5iYWdAaW50ZWwuY29tPg0KPiA+IC0tLQ0KPiA+IGRyaXZlcnMv Ymx1ZXRvb3RoL2J0dXNiLmMgfCAxMiArKysrKysrKysrKysNCj4gPiAxIGZpbGUgY2hhbmdlZCwg MTIgaW5zZXJ0aW9ucygrKQ0KPiA+IA0KPiA+IGRpZmYgLS1naXQgYS9kcml2ZXJzL2JsdWV0b290 a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