From patchwork Thu Nov 24 15:29:11 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lars-Peter Clausen X-Patchwork-Id: 127538 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from mail-vw0-f56.google.com (mail-vw0-f56.google.com [209.85.212.56]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority" (verified OK)) by ozlabs.org (Postfix) with ESMTPS id A0A781007D7 for ; Fri, 25 Nov 2011 02:28:38 +1100 (EST) Received: by vbbfn1 with SMTP id fn1sf2440021vbb.11 for ; Thu, 24 Nov 2011 07:28:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=beta; h=x-beenthere:received-spf:x-spamscore:x-bigfish :x-forefront-antispam-report:x-fb-domain-ip-match:from:to:cc:subject :date:message-id:x-mailer:mime-version:x-original-sender :x-original-authentication-results:reply-to:precedence:mailing-list :list-id:x-google-group-id:list-post:list-help:list-archive:sender :list-subscribe:list-unsubscribe:content-type; bh=MpXHzEgs9dU3FYZvsXW8+YrMhin1ElGJCWUbg6iLHnc=; b=mTqmJEH4V2dkrsa3fI78f2gLHuWfGjL47zSee1Wn837kdfDI3P7i+1Dl5tuT7Pj+LE KIYnAWqFOqKEgTuFkQLO5v9CCGb4tTn9qZfQpf64dyiYSs/NaGhTPwsbWI3qTNOZt437 RqdFSqotRJGgCxG2y4Wn835fojXpbJ9GvEr2g= Received: by 10.52.92.232 with SMTP id cp8mr12975917vdb.13.1322148514182; Thu, 24 Nov 2011 07:28:34 -0800 (PST) X-BeenThere: rtc-linux@googlegroups.com Received: by 10.52.20.204 with SMTP id p12ls7063469vde.1.gmail; Thu, 24 Nov 2011 07:28:33 -0800 (PST) Received: by 10.52.30.195 with SMTP id u3mr37399406vdh.3.1322148513798; Thu, 24 Nov 2011 07:28:33 -0800 (PST) Received: by 10.52.30.195 with SMTP id u3mr37399404vdh.3.1322148513791; Thu, 24 Nov 2011 07:28:33 -0800 (PST) Received: from ch1outboundpool.messaging.microsoft.com (ch1ehsobe004.messaging.microsoft.com. [216.32.181.184]) by gmr-mx.google.com with ESMTPS id cn4si9943279vdb.3.2011.11.24.07.28.33 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 24 Nov 2011 07:28:33 -0800 (PST) Received-SPF: neutral (google.com: 216.32.181.184 is neither permitted nor denied by best guess record for domain of lars@metafoo.de) client-ip=216.32.181.184; Received: from mail209-ch1-R.bigfish.com (10.43.68.243) by CH1EHSOBE012.bigfish.com (10.43.70.62) with Microsoft SMTP Server id 14.1.225.22; Thu, 24 Nov 2011 15:27:50 +0000 Received: from mail209-ch1 (localhost [127.0.0.1]) by mail209-ch1-R.bigfish.com (Postfix) with ESMTP id 6513D3C0219; Thu, 24 Nov 2011 15:28:51 +0000 (UTC) X-SpamScore: 0 X-BigFish: VS0(zzzz1202hzz8275bh8275dhz2dh87h2a8h668h839h) X-Forefront-Antispam-Report: CIP:137.71.25.57; KIP:(null); UIP:(null); IPV:NLI; H:nwd2mta2.analog.com; RD:nwd2mail11.analog.com; EFVD:NLI X-FB-DOMAIN-IP-MATCH: fail Received: from mail209-ch1 (localhost.localdomain [127.0.0.1]) by mail209-ch1 (MessageSwitch) id 1322148526737069_7092; Thu, 24 Nov 2011 15:28:46 +0000 (UTC) Received: from CH1EHSMHS021.bigfish.com (snatpool1.int.messaging.microsoft.com [10.43.68.250]) by mail209-ch1.bigfish.com (Postfix) with ESMTP id A4CA0640042; Thu, 24 Nov 2011 15:28:46 +0000 (UTC) Received: from nwd2mta2.analog.com (137.71.25.57) by CH1EHSMHS021.bigfish.com (10.43.70.21) with Microsoft SMTP Server (TLS) id 14.1.225.22; Thu, 24 Nov 2011 15:27:45 +0000 Received: from NWD2HUBCAS2.ad.analog.com (nwd2hubcas2.ad.analog.com [10.64.73.30]) by nwd2mta2.analog.com (8.13.8/8.13.8) with ESMTP id pAOFmacE013525 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=FAIL); Thu, 24 Nov 2011 10:48:36 -0500 Received: from zeus.spd.analog.com (10.64.82.11) by NWD2HUBCAS2.ad.analog.com (10.64.73.30) with Microsoft SMTP Server id 8.3.83.0; Thu, 24 Nov 2011 10:28:32 -0500 Received: from lars-adi-laptop.analog.com ([10.44.2.122]) by zeus.spd.analog.com (8.14.1/8.14.1) with ESMTP id pAOFSM9u011935; Thu, 24 Nov 2011 10:28:23 -0500 (EST) From: Lars-Peter Clausen To: CC: Lars-Peter Clausen , John Stultz , Alessandro Zummo , Subject: [rtc-linux] [PATCH 01/11] RTC: Remove redundant spi driver bus initialization Date: Thu, 24 Nov 2011 16:29:11 +0100 Message-ID: <1322148561-25138-1-git-send-email-lars@metafoo.de> X-Mailer: git-send-email 1.7.7.1 MIME-Version: 1.0 X-Original-Sender: lars@metafoo.de X-Original-Authentication-Results: gmr-mx.google.com; spf=neutral (google.com: 216.32.181.184 is neither permitted nor denied by best guess record for domain of lars@metafoo.de) smtp.mail=lars@metafoo.de Reply-To: rtc-linux@googlegroups.com Precedence: list Mailing-list: list rtc-linux@googlegroups.com; contact rtc-linux+owners@googlegroups.com List-ID: X-Google-Group-Id: 712029733259 List-Post: , List-Help: , List-Archive: Sender: rtc-linux@googlegroups.com List-Subscribe: , List-Unsubscribe: , In ancient times it was necessary to manually initialize the bus field of an spi_driver to spi_bus_type. These days this is done in spi_driver_register(), so we can drop the manual assignment. The patch was generated using the following coccinelle semantic patch: // @@ identifier _driver; @@ struct spi_driver _driver = { .driver = { - .bus = &spi_bus_type, }, }; // Signed-off-by: Lars-Peter Clausen Cc: John Stultz Cc: Alessandro Zummo Cc: rtc-linux@googlegroups.com --- drivers/rtc/rtc-m41t93.c | 1 - drivers/rtc/rtc-m41t94.c | 1 - drivers/rtc/rtc-max6902.c | 1 - drivers/rtc/rtc-pcf2123.c | 1 - drivers/rtc/rtc-rs5c348.c | 1 - 5 files changed, 0 insertions(+), 5 deletions(-) diff --git a/drivers/rtc/rtc-m41t93.c b/drivers/rtc/rtc-m41t93.c index 7317d3b..ef71132 100644 --- a/drivers/rtc/rtc-m41t93.c +++ b/drivers/rtc/rtc-m41t93.c @@ -200,7 +200,6 @@ static int __devexit m41t93_remove(struct spi_device *spi) static struct spi_driver m41t93_driver = { .driver = { .name = "rtc-m41t93", - .bus = &spi_bus_type, .owner = THIS_MODULE, }, .probe = m41t93_probe, diff --git a/drivers/rtc/rtc-m41t94.c b/drivers/rtc/rtc-m41t94.c index e259ed7..2a4721f 100644 --- a/drivers/rtc/rtc-m41t94.c +++ b/drivers/rtc/rtc-m41t94.c @@ -147,7 +147,6 @@ static int __devexit m41t94_remove(struct spi_device *spi) static struct spi_driver m41t94_driver = { .driver = { .name = "rtc-m41t94", - .bus = &spi_bus_type, .owner = THIS_MODULE, }, .probe = m41t94_probe, diff --git a/drivers/rtc/rtc-max6902.c b/drivers/rtc/rtc-max6902.c index 0ec3f58..1f6b3cc 100644 --- a/drivers/rtc/rtc-max6902.c +++ b/drivers/rtc/rtc-max6902.c @@ -154,7 +154,6 @@ static int __devexit max6902_remove(struct spi_device *spi) static struct spi_driver max6902_driver = { .driver = { .name = "rtc-max6902", - .bus = &spi_bus_type, .owner = THIS_MODULE, }, .probe = max6902_probe, diff --git a/drivers/rtc/rtc-pcf2123.c b/drivers/rtc/rtc-pcf2123.c index 2ee3bbf..b46c400 100644 --- a/drivers/rtc/rtc-pcf2123.c +++ b/drivers/rtc/rtc-pcf2123.c @@ -340,7 +340,6 @@ static int __devexit pcf2123_remove(struct spi_device *spi) static struct spi_driver pcf2123_driver = { .driver = { .name = "rtc-pcf2123", - .bus = &spi_bus_type, .owner = THIS_MODULE, }, .probe = pcf2123_probe, diff --git a/drivers/rtc/rtc-rs5c348.c b/drivers/rtc/rtc-rs5c348.c index 971bc8e..ce2ca85 100644 --- a/drivers/rtc/rtc-rs5c348.c +++ b/drivers/rtc/rtc-rs5c348.c @@ -229,7 +229,6 @@ static int __devexit rs5c348_remove(struct spi_device *spi) static struct spi_driver rs5c348_driver = { .driver = { .name = "rtc-rs5c348", - .bus = &spi_bus_type, .owner = THIS_MODULE, }, .probe = rs5c348_probe,