From patchwork Thu Nov 1 01:59:13 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wei Yongjun X-Patchwork-Id: 1682991 Return-Path: X-Original-To: patchwork-linux-wireless@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 75E66DFB80 for ; Thu, 1 Nov 2012 01:59:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752761Ab2KAB7P (ORCPT ); Wed, 31 Oct 2012 21:59:15 -0400 Received: from mail-qc0-f174.google.com ([209.85.216.174]:41872 "EHLO mail-qc0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751182Ab2KAB7O (ORCPT ); Wed, 31 Oct 2012 21:59:14 -0400 Received: by mail-qc0-f174.google.com with SMTP id o22so1421121qcr.19 for ; Wed, 31 Oct 2012 18:59:13 -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=MY6lJTXJB/rh4ZAhSqC2gyHFjFSkkk3fL/dv/nC2iIk=; b=Wma5ta24RCMuahX+LzyeFOk4k0TdJJL9aJte8Qwo1W4fg1hRhX2yXdxiHP+Zy0olMe Q2pdc9cHE4pvfOaqG/EPFnVnabUK/W9hAOikVtK8KzLnUmem++2NpNFb44g91V4PSyPL m1FpBh9xN+CXHsGm1McXP7iazrGHBK+lc22i7ZqSZz580HsRAi+73t0vLb2DM5vuo3Vv aNp5g6jLw7+Qb3NyaonSeDbKB+YbEXRvrrnritB/1ZT57F7UOrUSa6viDt7IApKJqmgu lbAi/v4UC++T6yFKmiLQeNQvpd0F/ec6ApBUr09yHor/c60UmFre/+dHDIO8nLOk1eAW au9Q== MIME-Version: 1.0 Received: by 10.49.85.202 with SMTP id j10mr32002000qez.59.1351735153430; Wed, 31 Oct 2012 18:59:13 -0700 (PDT) Received: by 10.229.207.197 with HTTP; Wed, 31 Oct 2012 18:59:13 -0700 (PDT) Date: Thu, 1 Nov 2012 09:59:13 +0800 Message-ID: Subject: [PATCH -next] ar5523: use module_usb_driver to simplify the code From: Wei Yongjun To: pontus.fuchs@gmail.com, linville@tuxdriver.com Cc: yongjun_wei@trendmicro.com.cn, linux-wireless@vger.kernel.org Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org From: Wei Yongjun Use the module_usb_driver() macro to make the code simpler by eliminating module_init and module_exit calls. dpatch engine is used to auto generate this patch. (https://github.com/weiyj/dpatch) Signed-off-by: Wei Yongjun --- drivers/net/wireless/ath/ar5523/ar5523.c | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" 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/net/wireless/ath/ar5523/ar5523.c b/drivers/net/wireless/ath/ar5523/ar5523.c index f782b6e..402e6d3 100644 --- a/drivers/net/wireless/ath/ar5523/ar5523.c +++ b/drivers/net/wireless/ath/ar5523/ar5523.c @@ -1789,18 +1789,7 @@ static struct usb_driver ar5523_driver = { .disconnect = ar5523_disconnect, }; -static int __init ar5523_init(void) -{ - return usb_register(&ar5523_driver); -} - -static void __exit ar5523_exit(void) -{ - usb_deregister(&ar5523_driver); -} +module_usb_driver(ar5523_driver); MODULE_LICENSE("Dual BSD/GPL"); MODULE_FIRMWARE(AR5523_FIRMWARE_FILE); - -module_init(ar5523_init); -module_exit(ar5523_exit);