From patchwork Wed Apr 7 16:04:26 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Felipe Balbi X-Patchwork-Id: 91069 X-Patchwork-Delegate: tony@atomide.com Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o37G5OHu005567 for ; Wed, 7 Apr 2010 16:05:30 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932882Ab0DGQF3 (ORCPT ); Wed, 7 Apr 2010 12:05:29 -0400 Received: from smtp.nokia.com ([192.100.122.230]:58508 "EHLO mgw-mx03.nokia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932860Ab0DGQF2 (ORCPT ); Wed, 7 Apr 2010 12:05:28 -0400 Received: from vaebh106.NOE.Nokia.com (vaebh106.europe.nokia.com [10.160.244.32]) by mgw-mx03.nokia.com (Switch-3.3.3/Switch-3.3.3) with ESMTP id o37G58f2004996 for ; Wed, 7 Apr 2010 19:05:26 +0300 Received: from vaebh104.NOE.Nokia.com ([10.160.244.30]) by vaebh106.NOE.Nokia.com with Microsoft SMTPSVC(6.0.3790.3959); Wed, 7 Apr 2010 19:05:25 +0300 Received: from mgw-da02.ext.nokia.com ([147.243.128.26]) by vaebh104.NOE.Nokia.com over TLS secured channel with Microsoft SMTPSVC(6.0.3790.3959); Wed, 7 Apr 2010 19:05:25 +0300 Received: from localhost.localdomain (esdhcp04088.research.nokia.com [172.21.40.88]) by mgw-da02.ext.nokia.com (Switch-3.3.3/Switch-3.3.3) with ESMTP id o37G4YNJ015130; Wed, 7 Apr 2010 19:05:20 +0300 From: felipe.balbi@nokia.com To: Linux OMAP Mailing List Cc: Felipe Balbi Subject: [RFC PATCH 35/37] cbus: retu-wdt: remove the platform_device Date: Wed, 7 Apr 2010 19:04:26 +0300 Message-Id: <1270656268-7034-36-git-send-email-felipe.balbi@nokia.com> X-Mailer: git-send-email 1.7.0.rc0.33.g7c3932 In-Reply-To: <1270656268-7034-1-git-send-email-felipe.balbi@nokia.com> References: <1270656268-7034-1-git-send-email-felipe.balbi@nokia.com> X-OriginalArrivalTime: 07 Apr 2010 16:05:25.0420 (UTC) FILETIME=[2253A6C0:01CAD66C] X-Nokia-AV: Clean Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Wed, 07 Apr 2010 16:05:30 +0000 (UTC) diff --git a/drivers/cbus/retu-wdt.c b/drivers/cbus/retu-wdt.c index 380fae6..763b34f 100644 --- a/drivers/cbus/retu-wdt.c +++ b/drivers/cbus/retu-wdt.c @@ -32,7 +32,6 @@ #include #include #include -#include #include #include @@ -48,7 +47,6 @@ #define RETU_WDT_DEFAULT_TIMER 32 #define RETU_WDT_MAX_TIMER 63 -static struct completion retu_wdt_completion; static DEFINE_MUTEX(retu_wdt_mutex); /* Current period of watchdog */ @@ -321,21 +319,8 @@ static int __devexit retu_wdt_remove(struct device *dev) return 0; } -static void retu_wdt_device_release(struct device *dev) -{ - complete(&retu_wdt_completion); -} - -static struct platform_device retu_wdt_device = { - .name = "retu-watchdog", - .id = -1, - .dev = { - .release = retu_wdt_device_release, - }, -}; - static struct device_driver retu_wdt_driver = { - .name = "retu-watchdog", + .name = "retu-wdt", .bus = &platform_bus_type, .probe = retu_wdt_probe, .remove = __devexit_p(retu_wdt_remove), @@ -349,16 +334,10 @@ static int __init retu_wdt_init(void) if (!ret) return -ENODEV; - init_completion(&retu_wdt_completion); - ret = driver_register(&retu_wdt_driver); if (ret) return ret; - ret = platform_device_register(&retu_wdt_device); - if (ret) - goto exit1; - /* passed as module parameter? */ ret = retu_modify_counter(counter_param); if (ret == -EINVAL) { @@ -367,23 +346,12 @@ static int __init retu_wdt_init(void) "retu_wdt_init: Intializing to default value\n"); } - printk(KERN_INFO "Retu watchdog driver initialized\n"); - return retu_wdt_ping(); - -exit1: - driver_unregister(&retu_wdt_driver); - wait_for_completion(&retu_wdt_completion); - - return ret; } static void __exit retu_wdt_exit(void) { - platform_device_unregister(&retu_wdt_device); driver_unregister(&retu_wdt_driver); - - wait_for_completion(&retu_wdt_completion); } module_init(retu_wdt_init);