From patchwork Tue Mar 5 03:23:43 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sachin Kamat X-Patchwork-Id: 2216451 Return-Path: X-Original-To: patchwork-linux-input@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id 1391A3FCF6 for ; Tue, 5 Mar 2013 03:34:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932490Ab3CEDe0 (ORCPT ); Mon, 4 Mar 2013 22:34:26 -0500 Received: from mail-pb0-f52.google.com ([209.85.160.52]:50614 "EHLO mail-pb0-f52.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932472Ab3CEDeZ (ORCPT ); Mon, 4 Mar 2013 22:34:25 -0500 Received: by mail-pb0-f52.google.com with SMTP id ma3so3806074pbc.11 for ; Mon, 04 Mar 2013 19:34:25 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:from:to:cc:subject:date:message-id:x-mailer:in-reply-to :references:x-gm-message-state; bh=Mqsp5H/ol0saakgvSmvueRjh30geu7WuwwWKsA8Yekk=; b=R3xLQyRMh8+J8jlhctP0TmxtaiKidnFrrX0IWiPOo+8QS1Chc31MAXNKIyVeCY648W PpZdjUAm3zn6XmIuUBTrY9YFeOXbvuC8aLQzM3bkZRjr9jfeT4S3WivqbGD8j/lvNwGr aefSGrezdQDu08cEqATP0rgx8JZCqBSVk4yLkd+XPedVw/TeyCaUziS5lY7UjI5gQBnh Xh6/RhhiZkMV/SqaayaGijuEbRoTgxyxxLI373Zbs72I92/QZRquS1noEZx0AxADd0qZ /KtvODWpfvLFUoKpsWCqt9e7PoRTVfPGOL2GdQfLdx1Z635hCafEVTl3P0h62Oa2ZBMG ab1w== X-Received: by 10.68.211.8 with SMTP id my8mr33591608pbc.7.1362454464898; Mon, 04 Mar 2013 19:34:24 -0800 (PST) Received: from localhost.localdomain ([115.113.119.130]) by mx.google.com with ESMTPS id in5sm24712358pbc.20.2013.03.04.19.34.22 (version=TLSv1 cipher=RC4-SHA bits=128/128); Mon, 04 Mar 2013 19:34:24 -0800 (PST) From: Sachin Kamat To: linux-input@vger.kernel.org Cc: dmitry.torokhov@gmail.com, sachin.kamat@linaro.org Subject: [PATCH 4/8] Input: nomadik-ske-keypad: Use module_platform_driver_probe macro Date: Tue, 5 Mar 2013 08:53:43 +0530 Message-Id: <1362453827-18129-4-git-send-email-sachin.kamat@linaro.org> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <1362453827-18129-1-git-send-email-sachin.kamat@linaro.org> References: <1362453827-18129-1-git-send-email-sachin.kamat@linaro.org> X-Gm-Message-State: ALoCoQm+yqsMfCSTGliNbgW7ku2nD0wvImpBCsT2/5ove66yrGlJImuzqv2WMX+Rj6WQWAu57Plc Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org module_platform_driver_probe() eliminates the boilerplate and simplifies the code. Signed-off-by: Sachin Kamat Acked-by: Linus Walleij --- drivers/input/keyboard/nomadik-ske-keypad.c | 12 +----------- 1 files changed, 1 insertions(+), 11 deletions(-) diff --git a/drivers/input/keyboard/nomadik-ske-keypad.c b/drivers/input/keyboard/nomadik-ske-keypad.c index 0e6a815..c7d505c 100644 --- a/drivers/input/keyboard/nomadik-ske-keypad.c +++ b/drivers/input/keyboard/nomadik-ske-keypad.c @@ -430,17 +430,7 @@ static struct platform_driver ske_keypad_driver = { .remove = ske_keypad_remove, }; -static int __init ske_keypad_init(void) -{ - return platform_driver_probe(&ske_keypad_driver, ske_keypad_probe); -} -module_init(ske_keypad_init); - -static void __exit ske_keypad_exit(void) -{ - platform_driver_unregister(&ske_keypad_driver); -} -module_exit(ske_keypad_exit); +module_platform_driver_probe(ske_keypad_driver, ske_keypad_probe); MODULE_LICENSE("GPL v2"); MODULE_AUTHOR("Naveen Kumar / Sundar Iyer ");