Return-Path: From: "An, Tedd" To: Marcel Holtmann CC: linux-bluetooth Subject: RE: [PATCH 1/3] hciattach: add common debug print functions and toggle option Date: Wed, 23 May 2012 04:38:16 +0000 Message-ID: References: <148659297.eyne5QQyzV@tedd-ubuntu> <1337742978.15105.34.camel@aeonflux> In-Reply-To: <1337742978.15105.34.camel@aeonflux> Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 List-ID: TWFyY2VsLg0KDQpUaGFua3MgZm9yIHRoZSBjb21tZW50cy4gSSBqdXN0IGZpeGVkIHVwIGFuZCBz ZW50IHRoZSBwYXRjaGVzLg0KQlRXLCBkbyB5b3Ugd2FudCBtZSB0byBydW4gdGhlICJjaGVja3Bh dGNoIiB3aXRoIGhjaWF0dGFjaC5jIGFuZCBoY2lhdHRhY2guaCB0byBmaXggdGhlIGNvZGluZyBz dHlsZT8NCkV2ZW4gd2l0aCBteSAicm9va2llIiBleWVzLCBJIGNhbiBzZWUgc29tZSBjb2Rpbmcg c3R5bGUgaXNzdWUuDQoNCkxldCBtZSBrbm93Lg0KDQpSZWdhcmRzLg0KDQpUZWRkDQoNCj4gLS0t LS1PcmlnaW5hbCBNZXNzYWdlLS0tLS0NCj4gRnJvbTogTWFyY2VsIEhvbHRtYW5uIFttYWlsdG86 bWFyY2VsQGhvbHRtYW5uLm9yZ10NCj4gU2VudDogVHVlc2RheSwgTWF5IDIyLCAyMDEyIDg6MTYg UE0NCj4gVG86IEFuLCBUZWRkDQo+IENjOiBsaW51eC1ibHVldG9vdGgNCj4gU3ViamVjdDogUmU6 IFtQQVRDSCAxLzNdIGhjaWF0dGFjaDogYWRkIGNvbW1vbiBkZWJ1ZyBwcmludCBmdW5jdGlvbnMg YW5kDQo+IHRvZ2dsZSBvcHRpb24NCj4gDQo+IEhpIFRlZGQsDQo+IA0KPiA+IFRoaXMgYWRkcyBj b21tb24gZGVidWcgcHJpbnQgZnVuY3Rpb25zIHRoYXQgcHJpbnQgdGhlIGRlYnVnIG1lc3NhZ2Vz D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