From patchwork Tue Mar 5 03:23:46 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sachin Kamat X-Patchwork-Id: 2216481 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 9B2613FCF6 for ; Tue, 5 Mar 2013 03:34:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932547Ab3CEDee (ORCPT ); Mon, 4 Mar 2013 22:34:34 -0500 Received: from mail-pb0-f52.google.com ([209.85.160.52]:42310 "EHLO mail-pb0-f52.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932472Ab3CEDed (ORCPT ); Mon, 4 Mar 2013 22:34:33 -0500 Received: by mail-pb0-f52.google.com with SMTP id ma3so3816731pbc.39 for ; Mon, 04 Mar 2013 19:34:32 -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=ReA0j3kGThuCIHp3S5LDfKK6lLPiXD1sXGbFqD+Nyrc=; b=Rl0kchPjEDv2c1NEh15Om41o8wIP1Pqoe/F6DK0U27nwX/MnCjR3P1z+HUFawnZ5el GNw4D5Oyr5Gbw1WjPNpVHE/my0IfIPBDjsD+9yP+Y7A2PIg1js3PlWrpaTIIqX9ws255 h+s1+11YIpAFd0iMnKmZs5Y3iM4dyYS+jGs37dKUj9PEqp58/3BOMfjeiy/uviIK8brg mVypWw/NNc3sjtXNCV8fE4G3aiaAI/Qg/gQnTvYxZa5lLFT4dse2pFKGDGGUTInDonDS CUMNm8uOena3N75p/NtKbiV3TydEq1i7CPwZHnsZ1RUJtsf86h+C+dUhDVNmuAMgqg0Q TWsQ== X-Received: by 10.68.189.199 with SMTP id gk7mr32732394pbc.164.1362454472419; Mon, 04 Mar 2013 19:34:32 -0800 (PST) Received: from localhost.localdomain ([115.113.119.130]) by mx.google.com with ESMTPS id in5sm24712358pbc.20.2013.03.04.19.34.30 (version=TLSv1 cipher=RC4-SHA bits=128/128); Mon, 04 Mar 2013 19:34:31 -0800 (PST) From: Sachin Kamat To: linux-input@vger.kernel.org Cc: dmitry.torokhov@gmail.com, sachin.kamat@linaro.org Subject: [PATCH 7/8] Input: q40kbd: Use module_platform_driver_probe macro Date: Tue, 5 Mar 2013 08:53:46 +0530 Message-Id: <1362453827-18129-7-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: ALoCoQnAUEO+8Od3S4Rs1QKk0cWzwswoyDJ+CEoC52GefOsZANXbdYrqRqjeCYSKAKgFXNzy4NP7 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/q40kbd.c | 13 +------------ 1 files changed, 1 insertions(+), 12 deletions(-) diff --git a/drivers/input/serio/q40kbd.c b/drivers/input/serio/q40kbd.c index 70fe542..436a343 100644 --- a/drivers/input/serio/q40kbd.c +++ b/drivers/input/serio/q40kbd.c @@ -193,15 +193,4 @@ static struct platform_driver q40kbd_driver = { .remove = q40kbd_remove, }; -static int __init q40kbd_init(void) -{ - return platform_driver_probe(&q40kbd_driver, q40kbd_probe); -} - -static void __exit q40kbd_exit(void) -{ - platform_driver_unregister(&q40kbd_driver); -} - -module_init(q40kbd_init); -module_exit(q40kbd_exit); +module_platform_driver_probe(q40kbd_driver, q40kbd_probe);