From patchwork Tue Mar 5 03:23:45 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sachin Kamat X-Patchwork-Id: 2216471 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 EF88D3FCF6 for ; Tue, 5 Mar 2013 03:34:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932525Ab3CEDeb (ORCPT ); Mon, 4 Mar 2013 22:34:31 -0500 Received: from mail-pb0-f47.google.com ([209.85.160.47]:56623 "EHLO mail-pb0-f47.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932472Ab3CEDea (ORCPT ); Mon, 4 Mar 2013 22:34:30 -0500 Received: by mail-pb0-f47.google.com with SMTP id rp2so3805417pbb.34 for ; Mon, 04 Mar 2013 19:34:30 -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=SrOL7AbWhEf3lKMxc7BqyKeI0gNsqsH8cnZviSofE4E=; b=mDjfV3jkxXRIiH2kTvtxdaTMECgGYSkJIBPH8I9xTqU/cqW2fcwn6MfwZ+3XGjSz/8 y2PJuP82LVoyEXv3gWx2VCQVPU6Dcn2p6i6a1A1letAW3+5EMTIp27uPKN298/IEOV1t 94hk/Qz9Canx6i5WxEmgML1+UsFZ7km8Lsf1Grqx59U2ecX0uBm8yDzTekHTyhBvxef0 dJQcKW/1f/KVuYV03a74OfNcZO9AyV0YJwXOTo31bTPaHzdPMz41euNBWQHwsZkaylwT iPOQoJE7UyAs8X8dmfJr9lK3fMv9JkzlN4JlAjBISiiAbjirc2D0YGDuhwl8XQkpeC9M kPMQ== X-Received: by 10.68.135.196 with SMTP id pu4mr33970158pbb.50.1362454469980; Mon, 04 Mar 2013 19:34:29 -0800 (PST) Received: from localhost.localdomain ([115.113.119.130]) by mx.google.com with ESMTPS id in5sm24712358pbc.20.2013.03.04.19.34.27 (version=TLSv1 cipher=RC4-SHA bits=128/128); Mon, 04 Mar 2013 19:34:29 -0800 (PST) From: Sachin Kamat To: linux-input@vger.kernel.org Cc: dmitry.torokhov@gmail.com, sachin.kamat@linaro.org Subject: [PATCH 6/8] Input: at32psif: Use module_platform_driver_probe macro Date: Tue, 5 Mar 2013 08:53:45 +0530 Message-Id: <1362453827-18129-6-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: ALoCoQkmX5nyt/5C3mYOhi8XBOF4njR224cER9JS2r7pkKCONJY3+BQ9+KjBUeDl/8yPGfxrZod6 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 --- drivers/input/serio/at32psif.c | 13 +------------ 1 files changed, 1 insertions(+), 12 deletions(-) diff --git a/drivers/input/serio/at32psif.c b/drivers/input/serio/at32psif.c index 36e799c..190ce35 100644 --- a/drivers/input/serio/at32psif.c +++ b/drivers/input/serio/at32psif.c @@ -359,18 +359,7 @@ static struct platform_driver psif_driver = { }, }; -static int __init psif_init(void) -{ - return platform_driver_probe(&psif_driver, psif_probe); -} - -static void __exit psif_exit(void) -{ - platform_driver_unregister(&psif_driver); -} - -module_init(psif_init); -module_exit(psif_exit); +module_platform_driver_probe(psif_driver, psif_probe); MODULE_AUTHOR("Hans-Christian Egtvedt "); MODULE_DESCRIPTION("Atmel AVR32 PSIF PS/2 driver");