From patchwork Tue Mar 5 03:23:42 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sachin Kamat X-Patchwork-Id: 2216441 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 3905D3FCF6 for ; Tue, 5 Mar 2013 03:34:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759081Ab3CEDeZ (ORCPT ); Mon, 4 Mar 2013 22:34:25 -0500 Received: from mail-pb0-f46.google.com ([209.85.160.46]:64498 "EHLO mail-pb0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932490Ab3CEDeX (ORCPT ); Mon, 4 Mar 2013 22:34:23 -0500 Received: by mail-pb0-f46.google.com with SMTP id uo15so3782713pbc.5 for ; Mon, 04 Mar 2013 19:34:22 -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=gVGPav0dnWdkULk7mrPYJCq/ynlfBh9Q9LM4LKldONw=; b=pTWozvTivTQMRtNcYNH5j4Nc2iKcDYykTSNirug0SH4YVjgMWdtnHucjKXWr/V1rMP 8aqnQD2Mqg4a4ievQ5z6QZfJPJxdaPizuinOR3gYMR+IZUU9sTIF+gfhIZy6v40lpIAf NgP+YSDu6Vcu6tEkHSwiD6n9f5xJ0BwD3qcfBd1EVTGm6/OshOrvgmNx6g6orgFiv1Fs NcoyTsHFvWS1h/Y/8FyjnFgEMz2oMdgPtH7Z+hOFsBxhhTgXpMWD/AnnCGk7/Lu0vLmT 9+xYpdXUmg5DuiqQWzcrtQ4m/ODMzHFTDbbec1DF+zqnioz3CpWsiQlbgRqp0yFw0Aq7 anIA== X-Received: by 10.68.11.35 with SMTP id n3mr33208765pbb.220.1362454462128; Mon, 04 Mar 2013 19:34:22 -0800 (PST) Received: from localhost.localdomain ([115.113.119.130]) by mx.google.com with ESMTPS id in5sm24712358pbc.20.2013.03.04.19.34.19 (version=TLSv1 cipher=RC4-SHA bits=128/128); Mon, 04 Mar 2013 19:34:21 -0800 (PST) From: Sachin Kamat To: linux-input@vger.kernel.org Cc: dmitry.torokhov@gmail.com, sachin.kamat@linaro.org Subject: [PATCH 3/8] Input: amikbd: Use module_platform_driver_probe macro Date: Tue, 5 Mar 2013 08:53:42 +0530 Message-Id: <1362453827-18129-3-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: ALoCoQlTOoW5xoIehie0aSexf35ee8yTVjB5JGWtbLIhRe66qSVIO13O1A0P/QArYm3kY3bj2ibh 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/keyboard/amikbd.c | 14 +------------- 1 files changed, 1 insertions(+), 13 deletions(-) diff --git a/drivers/input/keyboard/amikbd.c b/drivers/input/keyboard/amikbd.c index 79172af..ba0b36f 100644 --- a/drivers/input/keyboard/amikbd.c +++ b/drivers/input/keyboard/amikbd.c @@ -260,18 +260,6 @@ static struct platform_driver amikbd_driver = { }, }; -static int __init amikbd_init(void) -{ - return platform_driver_probe(&amikbd_driver, amikbd_probe); -} - -module_init(amikbd_init); - -static void __exit amikbd_exit(void) -{ - platform_driver_unregister(&amikbd_driver); -} - -module_exit(amikbd_exit); +module_platform_driver_probe(amikbd_driver, amikbd_probe); MODULE_ALIAS("platform:amiga-keyboard");