Return-Path: From: "Bag, Amit K" To: Marcel Holtmann CC: "linux-bluetooth@vger.kernel.org" , "Srivatsa, Ravishankar" , "Tumkur Narayan, Chethan" Subject: RE: [PATCH] Bluetooth: btusb: Release RF resource on BT shutdown Date: Thu, 2 Aug 2018 15:42:12 +0000 Message-ID: References: In-Reply-To: Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 List-ID: DQogSGkgTWFyY2VsLA0KDQo+Pj4+IEluIGNhc2Ugb2YgQlQgdHVybiBvZmYgZnJvbSBVSSBpdCBp cyBzYWZlIHRvIGFkZCBIQ0kgcmVzZXQgY29tbWFuZCANCj4+Pj4gd2hpY2ggd2lsbCBtYWludGFp biB0aGUgY29udHJvbGxlciBzdGF0ZS4NCj4+PiANCj4+PiB0aGlzIG5lZWRzIHRvIGJlIGEgYml0 IG1vcmUgZGV0YWlscyBzaW5jZSBoZGV2LT5zaHV0ZG93biBoYW5kbGluZyBpcyByZWFsbHkgb25s eSBmb3IgdGhlIG9sZGVyIEludGVsIGNvbnRyb2xsZXJzLg0KPj4gDQo+Pj4gQWxzbyBJIGFtIGZh aWxpbmcgdG8gc2VlIHdoeSBIQ0kgUmVzZXQgaGVscHMgb3Igd2hhdCBpdCBkb2VzIGhlcmUuIEl0 IGlzIGdvaW5nIHRvIGJlIGNhbGxlZCBhZ2FpbiBvbiBoZGV2LT5vcGVuIHRoZSBuZXh0IHRpbWUg dGhlIGNvbnRyb2xsZXIgaXMgYWN0aXZhdGVkLg0KPj4+IA0KPj4+PiANCj4+Pj4gU2lnbmVkLW9m Zi1ieTogQW1pdCBLIEJhZyA8YW1pdC5rLmJhZ0BpbnRlbC5jb20+DQo+Pj4+IC0tLQ0KPj4+PiBk cml2ZXJzL2JsdWV0b290aC9idHVzYi5jIHwgMTIgKysrKysrKysrKysrDQo+Pj4+IDEgZmlsZSBj aGFuZ2VkLCAxMiBpbnNlcnRpb25zKCspDQo+Pj4+IA0KPj4+PiBkaWZmIC0tZ2l0IGEvZHJpdmVy cy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