From patchwork Thu May 30 11:42:54 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wei Yongjun X-Patchwork-Id: 2636121 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 2F5B1DF2A1 for ; Thu, 30 May 2013 11:43:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S935218Ab3E3Lm5 (ORCPT ); Thu, 30 May 2013 07:42:57 -0400 Received: from mail-bk0-f43.google.com ([209.85.214.43]:33335 "EHLO mail-bk0-f43.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932568Ab3E3Lmz (ORCPT ); Thu, 30 May 2013 07:42:55 -0400 Received: by mail-bk0-f43.google.com with SMTP id jm2so85153bkc.16 for ; Thu, 30 May 2013 04:42:54 -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=HIzBGsdj4BB+0vjJEno52GEGM4ydQFlKP/aOHCYTUUk=; b=nXxHDQ4DiBac/4kkpCjWQYcEvZ7SaxTkWppQwEWT2CQAjbSOixyKAI+F+pOgaTpJ0b J5xsW3lJUqli9SVgnjYV7AQ0SV/jQsFOhnjPmhyfIGTGfem8EQ5Q9OJDW8YhHSN2UBtx G0NLGfOwHHotDfBj/1TIkMCrG98+CV41Y1EZgoJN9TTid7gGtJ+2HijZhjPSZ3fnJ3Vg 42a/MCJdIhBKFYNQPbU6Wi8eGgm3si6dYVM+f0JUVBF4VPPuuxU0XBkAxIarwNWEFFdB gtpzyatrLJwFZJXNvNvDAVc5WbSUpUnu3JIS58ieSXJJBKmyhWj4F1EZlQtAExmunaX+ lxbg== MIME-Version: 1.0 X-Received: by 10.205.25.137 with SMTP id ri9mr1676446bkb.151.1369914174445; Thu, 30 May 2013 04:42:54 -0700 (PDT) Received: by 10.204.39.1 with HTTP; Thu, 30 May 2013 04:42:54 -0700 (PDT) Date: Thu, 30 May 2013 19:42:54 +0800 Message-ID: Subject: [PATCH -next] cw1200: use module_spi_driver to simplify the code From: Wei Yongjun To: pizza@shaftnet.org, 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 module_spi_driver() makes the code simpler by eliminating boilerplate code. Signed-off-by: Wei Yongjun Acked-by: Solomon Peachy --- drivers/net/wireless/cw1200/cw1200_spi.c | 15 +-------------- 1 file changed, 1 insertion(+), 14 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/cw1200/cw1200_spi.c b/drivers/net/wireless/cw1200/cw1200_spi.c index 04af685..1e6c58d 100644 --- a/drivers/net/wireless/cw1200/cw1200_spi.c +++ b/drivers/net/wireless/cw1200/cw1200_spi.c @@ -464,17 +464,4 @@ static struct spi_driver spi_driver = { }, }; -/* Init Module function -> Called by insmod */ -static int __init cw1200_spi_init(void) -{ - return spi_register_driver(&spi_driver); -} - -/* Called at Driver Unloading */ -static void __exit cw1200_spi_exit(void) -{ - spi_unregister_driver(&spi_driver); -} - -module_init(cw1200_spi_init); -module_exit(cw1200_spi_exit); +module_spi_driver(spi_driver);