From patchwork Tue Mar 5 03:23:44 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sachin Kamat X-Patchwork-Id: 2216461 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 74DDD3FCF6 for ; Tue, 5 Mar 2013 03:34:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932506Ab3CEDe2 (ORCPT ); Mon, 4 Mar 2013 22:34:28 -0500 Received: from mail-pb0-f46.google.com ([209.85.160.46]:47122 "EHLO mail-pb0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932472Ab3CEDe2 (ORCPT ); Mon, 4 Mar 2013 22:34:28 -0500 Received: by mail-pb0-f46.google.com with SMTP id uo15so3782800pbc.5 for ; Mon, 04 Mar 2013 19:34:27 -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=wDPNBWT1GpiueL1KSXfI55THo+TiKD5BsOh0TEvl4Go=; b=CJGAdjoPNtoiZsObuHou3ex8f9i/DXroprL7ghmzPpQYDUfWIPitDJGIU1T0ibs9Ob i6hjqGCsoi+sxTjNYiqWkEVNDXjM/bNTgTWzv4byyA/yYiyGN+cqoxgaVQwuGIfsSJU8 y2Zn4MBPkGjyIWrwAw5IkplOYAVB2hyNPa1PQQoe75dfNDdUr9LcI7y9Ungd0HhXA4Cw bFehVTuNlXJFbWkRzUsCcaC6hDuFgU5hTFQ8O5Uv+ZJOLGZJ/68QCmo2z0c+wmudhbVU /7hvjXUmtBosM9CztdBe1fZVFFyGMWBW4sA715OEF9Ia6F1Ed5BsvROF4mtqydIOBS6W OGUQ== X-Received: by 10.68.136.138 with SMTP id qa10mr5732480pbb.20.1362454467506; Mon, 04 Mar 2013 19:34:27 -0800 (PST) Received: from localhost.localdomain ([115.113.119.130]) by mx.google.com with ESMTPS id in5sm24712358pbc.20.2013.03.04.19.34.25 (version=TLSv1 cipher=RC4-SHA bits=128/128); Mon, 04 Mar 2013 19:34:26 -0800 (PST) From: Sachin Kamat To: linux-input@vger.kernel.org Cc: dmitry.torokhov@gmail.com, sachin.kamat@linaro.org Subject: [PATCH 5/8] Input: amimouse: Use module_platform_driver_probe macro Date: Tue, 5 Mar 2013 08:53:44 +0530 Message-Id: <1362453827-18129-5-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: ALoCoQlbfqVdiEsDNxVTTNuPDyW1cFlhDZ/wFO2u32cez8CtLvsrFd6vQRD5H/y3XwfXRFUFiSyi 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/mouse/amimouse.c | 14 +------------- 1 files changed, 1 insertions(+), 13 deletions(-) diff --git a/drivers/input/mouse/amimouse.c b/drivers/input/mouse/amimouse.c index 5fa9934..b55d5af 100644 --- a/drivers/input/mouse/amimouse.c +++ b/drivers/input/mouse/amimouse.c @@ -146,18 +146,6 @@ static struct platform_driver amimouse_driver = { }, }; -static int __init amimouse_init(void) -{ - return platform_driver_probe(&amimouse_driver, amimouse_probe); -} - -module_init(amimouse_init); - -static void __exit amimouse_exit(void) -{ - platform_driver_unregister(&amimouse_driver); -} - -module_exit(amimouse_exit); +module_platform_driver_probe(amimouse_driver, amimouse_probe); MODULE_ALIAS("platform:amiga-mouse");