Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756790Ab3DZMr4 (ORCPT ); Fri, 26 Apr 2013 08:47:56 -0400 Received: from metis.ext.pengutronix.de ([92.198.50.35]:40799 "EHLO metis.ext.pengutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751476Ab3DZMrz (ORCPT ); Fri, 26 Apr 2013 08:47:55 -0400 From: Jan Luebbe To: Andrew Morton Cc: Rodolfo Giometti , linux-kernel@vger.kernel.org, Jan Luebbe Subject: [PATCH 2/2] pps-gpio: convert to module_platform_driver Date: Fri, 26 Apr 2013 14:47:49 +0200 Message-Id: <1366980469-6763-2-git-send-email-jlu@pengutronix.de> X-Mailer: git-send-email 1.8.2.rc2 In-Reply-To: <1366980469-6763-1-git-send-email-jlu@pengutronix.de> References: <1365577958-13295-1-git-send-email-jlu@pengutronix.de> <1366980469-6763-1-git-send-email-jlu@pengutronix.de> X-SA-Exim-Connect-IP: 2001:6f8:1178:2:21e:67ff:fe11:9c5c X-SA-Exim-Mail-From: jlu@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1379 Lines: 45 This removes some boilerplate code (no functional changes). Signed-off-by: Jan Luebbe Acked-by: Rodolfo Giometti --- drivers/pps/clients/pps-gpio.c | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) diff --git a/drivers/pps/clients/pps-gpio.c b/drivers/pps/clients/pps-gpio.c index 221858d..6768f95 100644 --- a/drivers/pps/clients/pps-gpio.c +++ b/drivers/pps/clients/pps-gpio.c @@ -188,23 +188,7 @@ static struct platform_driver pps_gpio_driver = { }, }; -static int __init pps_gpio_init(void) -{ - int ret = platform_driver_register(&pps_gpio_driver); - if (ret < 0) - pr_err("failed to register platform driver\n"); - return ret; -} - -static void __exit pps_gpio_exit(void) -{ - platform_driver_unregister(&pps_gpio_driver); - pr_debug("unregistered platform driver\n"); -} - -module_init(pps_gpio_init); -module_exit(pps_gpio_exit); - +module_platform_driver(pps_gpio_driver); MODULE_AUTHOR("Ricardo Martins "); MODULE_AUTHOR("James Nuss "); MODULE_DESCRIPTION("Use GPIO pin as PPS source"); -- 1.7.10.4 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/