From patchwork Fri Mar 15 15:07:02 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wei Yongjun X-Patchwork-Id: 2278421 X-Patchwork-Delegate: jikos@jikos.cz Return-Path: X-Original-To: patchwork-linux-input@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id 159CBDF24C for ; Fri, 15 Mar 2013 15:07:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754639Ab3COPHF (ORCPT ); Fri, 15 Mar 2013 11:07:05 -0400 Received: from mail-bk0-f47.google.com ([209.85.214.47]:57550 "EHLO mail-bk0-f47.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754428Ab3COPHE (ORCPT ); Fri, 15 Mar 2013 11:07:04 -0400 Received: by mail-bk0-f47.google.com with SMTP id jc3so1533974bkc.20 for ; Fri, 15 Mar 2013 08:07:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:date:message-id:subject:from:to:cc :content-type; bh=rk9GLWj6X5/Jc/EodbUhXaJHAvPORaikU5wvw04AiGU=; b=JuX2a1LDNMhArtWx+bRd5TDdrdfzJrO2e8zY+kNZk5621devE8aPcKICzJRtoggP5i or8QCeE2CZpbh/TUlyRp3bWpFr0So578MKjKSjk5Ml5B5sktNTgpbblk5ZJS4qv/IXXF XTAuEcl6Y1eMKF2+OChjrBsb+bd6z7+1g6sbL8hawF8ax5hbyNuccGm18HwBzIbi7/zt aTWQZgPRq6tJ9yDk5LHkpMe3G/Auui6fhLKBoHjT9M5A5keUHYBa3p+HNMBfqZizFKN8 Hqmajef3iMi08tSxsbZ8SKT0eQVULxmMP4n2aYSSGE4VLNGP8zDa3zkkz9HsuXCchbBS 2Nrg== MIME-Version: 1.0 X-Received: by 10.205.32.208 with SMTP id sl16mr3344992bkb.27.1363360022428; Fri, 15 Mar 2013 08:07:02 -0700 (PDT) Received: by 10.204.30.210 with HTTP; Fri, 15 Mar 2013 08:07:02 -0700 (PDT) Date: Fri, 15 Mar 2013 23:07:02 +0800 Message-ID: Subject: [PATCH -next] HID: steelseries: use module_hid_driver() to simplify the code From: Wei Yongjun To: jkosina@suse.cz Cc: yongjun_wei@trendmicro.com.cn, linux-input@vger.kernel.org Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org From: Wei Yongjun module_hid_driver() makes the code simpler by eliminating boilerplate code.. Signed-off-by: Wei Yongjun --- drivers/hid/hid-steelseries.c | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe linux-input" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/hid/hid-steelseries.c b/drivers/hid/hid-steelseries.c index 98e66ac..9b0efb0 100644 --- a/drivers/hid/hid-steelseries.c +++ b/drivers/hid/hid-steelseries.c @@ -377,16 +377,5 @@ static struct hid_driver steelseries_srws1_driver = { .report_fixup = steelseries_srws1_report_fixup }; -static int __init steelseries_srws1_init(void) -{ - return hid_register_driver(&steelseries_srws1_driver); -} - -static void __exit steelseries_srws1_exit(void) -{ - hid_unregister_driver(&steelseries_srws1_driver); -} - -module_init(steelseries_srws1_init); -module_exit(steelseries_srws1_exit); +module_hid_driver(steelseries_srws1_driver); MODULE_LICENSE("GPL");