From patchwork Wed Apr 7 16:04:19 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Felipe Balbi X-Patchwork-Id: 91068 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 o37G5OHs005567 for ; Wed, 7 Apr 2010 16:05:30 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932880Ab0DGQF0 (ORCPT ); Wed, 7 Apr 2010 12:05:26 -0400 Received: from smtp.nokia.com ([192.100.122.230]:58500 "EHLO mgw-mx03.nokia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932875Ab0DGQFY (ORCPT ); Wed, 7 Apr 2010 12:05:24 -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 o37G58eu004996 for ; Wed, 7 Apr 2010 19:05:22 +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:16 +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:16 +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 o37G4YNC015130; Wed, 7 Apr 2010 19:05:11 +0300 From: felipe.balbi@nokia.com To: Linux OMAP Mailing List Cc: Felipe Balbi Subject: [RFC PATCH 28/37] cbus: retu-rtc: remove platform_device code Date: Wed, 7 Apr 2010 19:04:19 +0300 Message-Id: <1270656268-7034-29-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:16.0545 (UTC) FILETIME=[1D096F10: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-rtc.c b/drivers/cbus/retu-rtc.c index f34780b..40a42f1 100644 --- a/drivers/cbus/retu-rtc.c +++ b/drivers/cbus/retu-rtc.c @@ -49,16 +49,10 @@ static struct mutex retu_rtc_mutex; static u16 retu_rtc_alarm_expired; static u16 retu_rtc_reset_occurred; -static DECLARE_COMPLETION(retu_rtc_exited); static DECLARE_COMPLETION(retu_rtc_sync); static void retu_rtc_barrier(void); -static void retu_rtc_device_release(struct device *dev) -{ - complete(&retu_rtc_exited); -} - static ssize_t retu_rtc_time_show(struct device *dev, struct device_attribute *attr, char *buf) { @@ -428,14 +422,6 @@ static struct device_driver retu_rtc_driver = { .remove = __devexit_p(retu_rtc_remove), }; -static struct platform_device retu_rtc_device = { - .name = "retu-rtc", - .id = -1, - .dev = { - .release = retu_rtc_device_release, - }, -}; - /* This function provides syncronization with the RTCS interrupt handler */ static void retu_rtc_barrier(void) { @@ -448,29 +434,12 @@ static void retu_rtc_barrier(void) static int __init retu_rtc_init(void) { - int ret; - - init_completion(&retu_rtc_exited); - - if ((ret = driver_register(&retu_rtc_driver)) != 0) - return ret; - - if ((ret = platform_device_register(&retu_rtc_device)) != 0) - goto err_unregister_driver; - - return 0; - -err_unregister_driver: - driver_unregister(&retu_rtc_driver); - return ret; + return driver_register(&retu_rtc_driver); } static void __exit retu_rtc_exit(void) { - platform_device_unregister(&retu_rtc_device); driver_unregister(&retu_rtc_driver); - - wait_for_completion(&retu_rtc_exited); } module_init(retu_rtc_init);