From patchwork Tue Mar 5 03:23:40 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sachin Kamat X-Patchwork-Id: 2216421 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 72B2E3FCF6 for ; Tue, 5 Mar 2013 03:34:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759249Ab3CEDeS (ORCPT ); Mon, 4 Mar 2013 22:34:18 -0500 Received: from mail-pb0-f49.google.com ([209.85.160.49]:46495 "EHLO mail-pb0-f49.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1759081Ab3CEDeS (ORCPT ); Mon, 4 Mar 2013 22:34:18 -0500 Received: by mail-pb0-f49.google.com with SMTP id xa12so3755863pbc.8 for ; Mon, 04 Mar 2013 19:34:17 -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 :x-gm-message-state; bh=odWsNf5k5JqVAPSef1J+e33HheFJnhwALT6lh0PCcAA=; b=XSGjeec4R1AvrDgMkV2kg3lff9swGpATdog2vZdmrb3Q/2+MlFJi6kUZVIXCkx/6+G D3mqVy9eQQ7bzomdgX6vO01oZxs11lWBU9AARAM86gGdt6d6rz8S2aupPmOYgcr4SLwP IIKbcGUau/N5PIxIwXDPUjWa3kib1bDfgkHh847OcmZTuDVsBtPOtnOn6kQfgckR8cm0 OHMpgMHr3iqEoIGk4uRHI62pNyOSF6RMBoiCWFUIoRDaQFiOvmTlWNzgDnKAJgHRETLY ngXaaRN5LqPOx6vuOVvyQAF8RiUaBoxviD3gW2fCUpknhGWJmkHpciW97aBjE2W5/8Wj ee8Q== X-Received: by 10.68.217.202 with SMTP id pa10mr33635757pbc.11.1362454456994; Mon, 04 Mar 2013 19:34:16 -0800 (PST) Received: from localhost.localdomain ([115.113.119.130]) by mx.google.com with ESMTPS id in5sm24712358pbc.20.2013.03.04.19.34.14 (version=TLSv1 cipher=RC4-SHA bits=128/128); Mon, 04 Mar 2013 19:34:16 -0800 (PST) From: Sachin Kamat To: linux-input@vger.kernel.org Cc: dmitry.torokhov@gmail.com, sachin.kamat@linaro.org Subject: [PATCH 1/8] Input: davinci_keyscan: Use module_platform_driver_probe macro Date: Tue, 5 Mar 2013 08:53:40 +0530 Message-Id: <1362453827-18129-1-git-send-email-sachin.kamat@linaro.org> X-Mailer: git-send-email 1.7.4.1 X-Gm-Message-State: ALoCoQncQNZungG9/lsHMMSdhjcTHnXx/by34lHyWWqGPlLEWn/wPpuMlegnMBjv8Dizv5WKL29q Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org module_platform_driver_probe() simplifies the code by eliminating boilerplate code. Signed-off-by: Sachin Kamat --- drivers/input/keyboard/davinci_keyscan.c | 12 +----------- 1 files changed, 1 insertions(+), 11 deletions(-) diff --git a/drivers/input/keyboard/davinci_keyscan.c b/drivers/input/keyboard/davinci_keyscan.c index 4e4e453..8297537 100644 --- a/drivers/input/keyboard/davinci_keyscan.c +++ b/drivers/input/keyboard/davinci_keyscan.c @@ -329,17 +329,7 @@ static struct platform_driver davinci_ks_driver = { .remove = davinci_ks_remove, }; -static int __init davinci_ks_init(void) -{ - return platform_driver_probe(&davinci_ks_driver, davinci_ks_probe); -} -module_init(davinci_ks_init); - -static void __exit davinci_ks_exit(void) -{ - platform_driver_unregister(&davinci_ks_driver); -} -module_exit(davinci_ks_exit); +module_platform_driver_probe(davinci_ks_driver, davinci_ks_probe); MODULE_AUTHOR("Miguel Aguilar"); MODULE_DESCRIPTION("Texas Instruments DaVinci Key Scan Driver");