From patchwork Wed May 29 10:09:22 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wei Yongjun X-Patchwork-Id: 2628541 X-Patchwork-Delegate: jikos@jikos.cz 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 598C340077 for ; Wed, 29 May 2013 10:09:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965412Ab3E2KJY (ORCPT ); Wed, 29 May 2013 06:09:24 -0400 Received: from mail-bk0-f43.google.com ([209.85.214.43]:52310 "EHLO mail-bk0-f43.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965230Ab3E2KJY (ORCPT ); Wed, 29 May 2013 06:09:24 -0400 Received: by mail-bk0-f43.google.com with SMTP id jm2so3177682bkc.16 for ; Wed, 29 May 2013 03:09:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:cc:content-type; bh=RYJjx25/DbCOm8C8vSv4RUU/gKmnpg8wk/QUCRe2hbM=; b=KSZnVZOiYOZrHQAL+4uiJVEcMc67tey04+OpV5MIXelCEj8YTR8IutJ8OsKYOF6Nkg kpi/IJUnSHThP7SPObyKVOvWIjFO2o5qpmXUmmMdAitYIoR6PSDUBD0i63+GeN9GCgRg 7xWhILYivIJQH/Vce+hTLUh6loDE7N8JmQMAMy5E4854ex7A8rhItxLBsxwsNdDdb8av nB2UjtHPEMBUZnPd8SLepTyXveEMxgXuyn/JetWlKMh/e7AttsVTMBY9kC7yrOOkXWae wiFzbHLZAVyL33soWZMj5x7lcD7UXEwbe4/3oaUF/TQb+05nnw+5KNrUkgjxkyUbn1E/ rbUA== MIME-Version: 1.0 X-Received: by 10.205.26.9 with SMTP id rk9mr587880bkb.39.1369822162659; Wed, 29 May 2013 03:09:22 -0700 (PDT) Received: by 10.204.39.1 with HTTP; Wed, 29 May 2013 03:09:22 -0700 (PDT) Date: Wed, 29 May 2013 18:09:22 +0800 Message-ID: Subject: [PATCH -next] HID: holtek-mouse: use module_hid_driver() to simplify the code From: Wei Yongjun To: jkosina@suse.cz, chr.ohm@gmx.net 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-holtek-mouse.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-holtek-mouse.c b/drivers/hid/hid-holtek-mouse.c index 6a23ee6..7e6db3c 100644 --- a/drivers/hid/hid-holtek-mouse.c +++ b/drivers/hid/hid-holtek-mouse.c @@ -73,16 +73,5 @@ static struct hid_driver holtek_mouse_driver = { .report_fixup = holtek_mouse_report_fixup, }; -static int __init holtek_mouse_init(void) -{ - return hid_register_driver(&holtek_mouse_driver); -} - -static void __exit holtek_mouse_exit(void) -{ - hid_unregister_driver(&holtek_mouse_driver); -} - -module_exit(holtek_mouse_exit); -module_init(holtek_mouse_init); +module_hid_driver(holtek_mouse_driver); MODULE_LICENSE("GPL");