From patchwork Thu May 29 11:51:01 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sachin Kamat X-Patchwork-Id: 31120 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-pb0-f72.google.com (mail-pb0-f72.google.com [209.85.160.72]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 2C0A8203E6 for ; Thu, 29 May 2014 11:53:33 +0000 (UTC) Received: by mail-pb0-f72.google.com with SMTP id ma3sf997543pbc.3 for ; Thu, 29 May 2014 04:53:32 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:sender:precedence:list-id:x-original-sender :x-original-authentication-results:mailing-list:list-post:list-help :list-archive:list-unsubscribe; bh=ITgRG+CYh0QJUzVw02dd9B/jfhgSsYeIX2TizT2lNu0=; b=OY9wmzlzBs/WOgY1hN3OUxvu79LPA1Oewz4vES/D8mdFuQGmwmV1AYdMWqRw7uq/rG N7iHofNdRtwmNa8rkds9puE8EOvhBdJ33Ed10lVAyT5aQpKZeGTMiwX7nyJiyVy329Pz ZtpXAH2t2B9szBpbIrt+t038j9eqeBOr8QakNFFZZrfryl02VTSRXFmoWf+k9WEAlpTJ OoevyFdPYvMAUIhM5syVRmmJ2pweeYlcXSC/q42zlOWJmK4ZMxI2xMw3cbLXqlnkZtBa 0kWFu77CjyJ79C0HWgm+0WI6r3ErcGRmAMgxfT6EkVgvnVJhbD4omHAZuN4iZwhTqYEP 7+nA== X-Gm-Message-State: ALoCoQlK496P5s5yL0agppgb/Y1pJ+p0v/mvHFnn18Kzr/F6YTcYkRy9TayDV7c3syxdwYK/Eu5T X-Received: by 10.67.4.202 with SMTP id cg10mr2836258pad.42.1401364412280; Thu, 29 May 2014 04:53:32 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.43.135 with SMTP id e7ls547551qga.70.gmail; Thu, 29 May 2014 04:53:32 -0700 (PDT) X-Received: by 10.58.111.163 with SMTP id ij3mr6076547veb.26.1401364412153; Thu, 29 May 2014 04:53:32 -0700 (PDT) Received: from mail-vc0-f182.google.com (mail-vc0-f182.google.com [209.85.220.182]) by mx.google.com with ESMTPS id zw4si263771vdc.60.2014.05.29.04.53.32 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 29 May 2014 04:53:32 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.182 as permitted sender) client-ip=209.85.220.182; Received: by mail-vc0-f182.google.com with SMTP id id10so228948vcb.27 for ; Thu, 29 May 2014 04:53:32 -0700 (PDT) X-Received: by 10.58.245.2 with SMTP id xk2mr5827006vec.9.1401364412077; Thu, 29 May 2014 04:53:32 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.220.221.72 with SMTP id ib8csp22094vcb; Thu, 29 May 2014 04:53:31 -0700 (PDT) X-Received: by 10.68.249.195 with SMTP id yw3mr8240543pbc.134.1401364410854; Thu, 29 May 2014 04:53:30 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id lu5si618206pab.154.2014.05.29.04.53.30; Thu, 29 May 2014 04:53:30 -0700 (PDT) Received-SPF: none (google.com: linux-usb-owner@vger.kernel.org does not designate permitted sender hosts) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932659AbaE2Lx0 (ORCPT + 3 others); Thu, 29 May 2014 07:53:26 -0400 Received: from mail-pb0-f48.google.com ([209.85.160.48]:46006 "EHLO mail-pb0-f48.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932535AbaE2LxZ (ORCPT ); Thu, 29 May 2014 07:53:25 -0400 Received: by mail-pb0-f48.google.com with SMTP id rr13so247308pbb.35 for ; Thu, 29 May 2014 04:53:24 -0700 (PDT) X-Received: by 10.66.66.199 with SMTP id h7mr8409449pat.30.1401364404548; Thu, 29 May 2014 04:53:24 -0700 (PDT) Received: from linaro.sisodomain.com ([14.140.216.146]) by mx.google.com with ESMTPSA id xk3sm878260pbb.65.2014.05.29.04.53.22 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 29 May 2014 04:53:23 -0700 (PDT) From: Sachin Kamat To: linux-usb@vger.kernel.org Cc: gregkh@linuxfoundation.org, davidm@egauge.net, sachin.kamat@linaro.org Subject: [PATCH 1/1] usb: host: max3421-hcd: Use module_spi_driver Date: Thu, 29 May 2014 17:21:01 +0530 Message-Id: <1401364261-2535-1-git-send-email-sachin.kamat@linaro.org> X-Mailer: git-send-email 1.7.9.5 Sender: linux-usb-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-usb@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: sachin.kamat@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.182 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , module_spi_driver simplifies the code by eliminating boilerplate code. Signed-off-by: Sachin Kamat Acked-by: David Mosberger --- drivers/usb/host/max3421-hcd.c | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/drivers/usb/host/max3421-hcd.c b/drivers/usb/host/max3421-hcd.c index 28abda14c5e2..e8568c0f1df3 100644 --- a/drivers/usb/host/max3421-hcd.c +++ b/drivers/usb/host/max3421-hcd.c @@ -1919,20 +1919,7 @@ static struct spi_driver max3421_driver = { }, }; -static int __init -max3421_mod_init(void) -{ - return spi_register_driver(&max3421_driver); -} - -static void __exit -max3421_mod_exit(void) -{ - spi_unregister_driver(&max3421_driver); -} - -module_init(max3421_mod_init); -module_exit(max3421_mod_exit); +module_spi_driver(max3421_driver); MODULE_DESCRIPTION(DRIVER_DESC); MODULE_AUTHOR("David Mosberger ");