From patchwork Tue Jul 3 11:47:51 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sachin Kamat X-Patchwork-Id: 9788 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id 7623823E2F for ; Tue, 3 Jul 2012 12:00:18 +0000 (UTC) Received: from mail-gg0-f180.google.com (mail-gg0-f180.google.com [209.85.161.180]) by fiordland.canonical.com (Postfix) with ESMTP id 43FF3A183D3 for ; Tue, 3 Jul 2012 12:00:18 +0000 (UTC) Received: by mail-gg0-f180.google.com with SMTP id f1so5586936ggn.11 for ; Tue, 03 Jul 2012 05:00:18 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-forwarded-to:x-forwarded-for:delivered-to:received-spf:from:to:cc :subject:date:message-id:x-mailer:in-reply-to:references :x-gm-message-state; bh=0Fv6JXFC51eDkeQsGCfhCSiiam5j1bFmNyBExUbsCAk=; b=X87rpFwn8MRW5rpfDYROfPs/eN/03EdEsnn6azSrApGK4pVZHn//CrTUfu8ALbT5Pj Tu+kX9U0+F9pQRix6zZkP3MqZzCOZesJv0A5qALPd9nRL62AJAk1RljQsw8zGMI0P4vp WI/BBAixvOdku70Uv1HnWcLOUxmR91jevbF6PuRaH4ccR1uPr8gNDR/TSMoM54cjnwA8 pzMvnEb0J+/eE1eDRA3Ay0UXFwrmaL3Yv4Flpe8YvAH0QX+hbpdQGnTBtSz8rz6USH9B HxLh4SXGvuJf9Wq0zL/5Y3YSJ0GOdDrP3MUAfsITUQKGUAfzbY3XvcJj1ZbG0OXD6Lag o9Xg== Received: by 10.50.195.234 with SMTP id ih10mr8074069igc.0.1341316817852; Tue, 03 Jul 2012 05:00:17 -0700 (PDT) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.231.24.148 with SMTP id v20csp38787ibb; Tue, 3 Jul 2012 05:00:17 -0700 (PDT) Received: by 10.236.114.231 with SMTP id c67mr20696173yhh.119.1341316817071; Tue, 03 Jul 2012 05:00:17 -0700 (PDT) Received: from mail-yx0-f178.google.com (mail-yx0-f178.google.com [209.85.213.178]) by mx.google.com with ESMTPS id z7si5444184anl.31.2012.07.03.05.00.16 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 03 Jul 2012 05:00:17 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.213.178 is neither permitted nor denied by best guess record for domain of sachin.kamat@linaro.org) client-ip=209.85.213.178; Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.213.178 is neither permitted nor denied by best guess record for domain of sachin.kamat@linaro.org) smtp.mail=sachin.kamat@linaro.org Received: by mail-yx0-f178.google.com with SMTP id l6so6099269yen.37 for ; Tue, 03 Jul 2012 05:00:16 -0700 (PDT) Received: by 10.66.74.69 with SMTP id r5mr28712965pav.56.1341316816403; Tue, 03 Jul 2012 05:00:16 -0700 (PDT) Received: from localhost.localdomain ([115.113.119.130]) by mx.google.com with ESMTPS id oo6sm15466531pbc.22.2012.07.03.05.00.13 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 03 Jul 2012 05:00:15 -0700 (PDT) From: Sachin Kamat To: linux-leds@vger.kernel.org Cc: bryan.wu@canonical.com, rpurdie@rpsys.net, sachin.kamat@linaro.org, patches@linaro.org Subject: [PATCH 2/5] leds: Use module_platform_driver() in leds-max8997.c file Date: Tue, 3 Jul 2012 17:17:51 +0530 Message-Id: <1341316074-14886-2-git-send-email-sachin.kamat@linaro.org> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <1341316074-14886-1-git-send-email-sachin.kamat@linaro.org> References: <1341316074-14886-1-git-send-email-sachin.kamat@linaro.org> X-Gm-Message-State: ALoCoQl0nk8/Gfj5blpi69QJjrYuvxlJOXEaBVBSdaf2ecAZ4dgQwXyMo3sBwGqhE+WKCoODtz2e module_platform_driver() makes the code simpler. Signed-off-by: Sachin Kamat --- drivers/leds/leds-max8997.c | 12 +----------- 1 files changed, 1 insertions(+), 11 deletions(-) diff --git a/drivers/leds/leds-max8997.c b/drivers/leds/leds-max8997.c index d9bcb49..979b629 100644 --- a/drivers/leds/leds-max8997.c +++ b/drivers/leds/leds-max8997.c @@ -351,17 +351,7 @@ static struct platform_driver max8997_led_driver = { .remove = __devexit_p(max8997_led_remove), }; -static int __init max8997_led_init(void) -{ - return platform_driver_register(&max8997_led_driver); -} -module_init(max8997_led_init); - -static void __exit max8997_led_exit(void) -{ - platform_driver_unregister(&max8997_led_driver); -} -module_exit(max8997_led_exit); +module_platform_driver(max8997_led_driver); MODULE_AUTHOR("Donggeun Kim "); MODULE_DESCRIPTION("MAX8997 LED driver");