From patchwork Sat May 23 17:42:08 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew de Quincey X-Patchwork-Id: 25540 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n4NHgKua011591 for ; Sat, 23 May 2009 17:42:20 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751187AbZEWRmJ (ORCPT ); Sat, 23 May 2009 13:42:09 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752844AbZEWRmI (ORCPT ); Sat, 23 May 2009 13:42:08 -0400 Received: from 82-71-49-12.dsl.in-addr.zen.co.uk ([82.71.49.12]:43480 "EHLO mail.lidskialf.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751187AbZEWRmI (ORCPT ); Sat, 23 May 2009 13:42:08 -0400 Received: from lidskialf.net (beyond.lidskialf.net [172.16.1.1]) by mail.lidskialf.net (Postfix) with ESMTP id 7C8CC48A6119C for ; Sat, 23 May 2009 18:42:08 +0100 (BST) Received: from munin.lidskialf.net (munin.lidskialf.net [172.16.1.17]) by lidskialf.net (Horde Framework) with HTTP; Sat, 23 May 2009 18:42:08 +0100 Message-ID: <20090523184208.14202m390hgqxv28@lidskialf.net> Date: Sat, 23 May 2009 18:42:08 +0100 From: Andrew de Quincey To: linux-omap@vger.kernel.org Subject: Patch: Fix N770 brf6150 bluetooth driver MIME-Version: 1.0 User-Agent: Internet Messaging Program (IMP) H3 (4.3) Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org This driver has the same problem as the cbus drivers - mismatch between platform_device and non-platform driver APIs. Switching it to use platform_driver removes the random corruption and badness I was seeing on boot. commit e6dce93304c6c692e187b95eaea227cfe3cb3317 Author: Andrew de Quincey Date: Sat May 23 18:37:25 2009 +0100 Fix brf6150.c platform_device breakage This driver has the mismatch between platform_devices and non-platform drivers. Switch it to use platform_driver as well. Signed-off-by: Andrew de Quincey diff --git a/drivers/bluetooth/brf6150.c b/drivers/bluetooth/brf6150.c index 211fa5e..f29caf5 100644 --- a/drivers/bluetooth/brf6150.c +++ b/drivers/bluetooth/brf6150.c @@ -90,9 +90,10 @@ static struct platform_device brf6150_device = { } }; -static struct device_driver brf6150_driver = { - .name = BT_DRIVER, - .bus = &platform_bus_type, +static struct platform_driver brf6150_driver = { + .driver = { + .name = BT_DRIVER, + } }; static inline void brf6150_outb(struct brf6150_info *info, unsigned int offset, u8 val) @@ -1002,7 +1003,7 @@ static int __init brf6150_init(void) goto cleanup_irq; } /* Register the driver with LDM */ - if (driver_register(&brf6150_driver)) { + if (platform_driver_register(&brf6150_driver)) { printk(KERN_WARNING "failed to register brf6150 driver\n"); platform_device_unregister(&brf6150_device); err = -ENODEV; @@ -1012,7 +1013,7 @@ static int __init brf6150_init(void) if (brf6150_register_hdev(info) < 0) { printk(KERN_WARNING "failed to register brf6150 hci device\n"); platform_device_unregister(&brf6150_device); - driver_unregister(&brf6150_driver); + platform_driver_unregister(&brf6150_driver); goto cleanup_irq; }