linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Hauke Mehrtens <hauke@hauke-m.de>
To: linux-wireless@vger.kernel.org, zajec5@gmail.com,
	linux-mips@linux-mips.org
Cc: mb@bu3sch.de, george@znau.edu.ua, arend@broadcom.com,
	b43-dev@lists.infradead.org, bernhardloos@googlemail.com,
	arnd@arndb.de, julian.calaby@gmail.com, sshtylyov@mvista.com,
	Hauke Mehrtens <hauke@hauke-m.de>
Subject: [RFC v3 02/13] bcma: move initializing of struct bcma_bus to own function.
Date: Thu, 30 Jun 2011 00:11:47 +0200	[thread overview]
Message-ID: <1309385518-12097-3-git-send-email-hauke@hauke-m.de> (raw)
In-Reply-To: <1309385518-12097-1-git-send-email-hauke@hauke-m.de>

This makes it possible to use this code in some other method.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
---
 drivers/bcma/scan.c |   17 +++++++++++------
 1 files changed, 11 insertions(+), 6 deletions(-)

diff --git a/drivers/bcma/scan.c b/drivers/bcma/scan.c
index 4012d8d..7970553 100644
--- a/drivers/bcma/scan.c
+++ b/drivers/bcma/scan.c
@@ -312,15 +312,10 @@ static int bcma_get_next_core(struct bcma_bus *bus, u32 __iomem **eromptr,
 	return 0;
 }
 
-int bcma_bus_scan(struct bcma_bus *bus)
+static void bcma_init_bus(struct bcma_bus *bus)
 {
-	u32 erombase;
-	u32 __iomem *eromptr, *eromend;
-
 	s32 tmp;
 
-	int err;
-
 	INIT_LIST_HEAD(&bus->cores);
 	bus->nr_cores = 0;
 
@@ -330,6 +325,16 @@ int bcma_bus_scan(struct bcma_bus *bus)
 	bus->chipinfo.id = (tmp & BCMA_CC_ID_ID) >> BCMA_CC_ID_ID_SHIFT;
 	bus->chipinfo.rev = (tmp & BCMA_CC_ID_REV) >> BCMA_CC_ID_REV_SHIFT;
 	bus->chipinfo.pkg = (tmp & BCMA_CC_ID_PKG) >> BCMA_CC_ID_PKG_SHIFT;
+}
+
+int bcma_bus_scan(struct bcma_bus *bus)
+{
+	u32 erombase;
+	u32 __iomem *eromptr, *eromend;
+
+	int err;
+
+	bcma_init_bus(bus);
 
 	erombase = bcma_scan_read32(bus, 0, BCMA_CC_EROM);
 	eromptr = bus->mmio;
-- 
1.7.4.1


  parent reply	other threads:[~2011-06-29 22:12 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-29 22:11 [RFC v3 00/13] bcma: add support for embedded devices like bcm4716 Hauke Mehrtens
2011-06-29 22:11 ` [RFC v3 01/13] bcma: move parsing of EEPROM into own function Hauke Mehrtens
2011-06-29 22:11 ` Hauke Mehrtens [this message]
2011-06-29 22:11 ` [RFC v3 03/13] bcma: add functions to scan cores needed on SoCs Hauke Mehrtens
2011-06-30  6:42   ` Rafał Miłecki
2011-06-30  7:23     ` Hauke Mehrtens
2011-06-29 22:11 ` [RFC v3 04/13] bcma: add SOC bus Hauke Mehrtens
2011-06-29 22:11 ` [RFC v3 05/13] bcma: add mips driver Hauke Mehrtens
2011-06-29 22:11 ` [RFC v3 06/13] bcma: add serial console support Hauke Mehrtens
2011-06-29 22:11 ` [RFC v3 07/13] bcma: get CPU clock Hauke Mehrtens
2011-06-29 22:11 ` [RFC v3 08/13] bcma: add pci(e) host mode Hauke Mehrtens
2011-06-29 22:11 ` [RFC v3 09/13] bcma: add check if sprom is available before accessing it Hauke Mehrtens
2011-06-29 22:11 ` [RFC v3 10/13] bcm47xx: prepare to support different buses Hauke Mehrtens
2011-06-29 22:11 ` [RFC v3 11/13] bcm47xx: make it possible to build bcm47xx without ssb Hauke Mehrtens
2011-06-30  8:31   ` Florian Fainelli
2011-06-29 22:11 ` [RFC v3 12/13] bcm47xx: add support for bcma bus Hauke Mehrtens
2011-06-30  8:31   ` Florian Fainelli
2011-06-29 22:11 ` [RFC v3 13/13] bcm47xx: fix irq assignment for new SoCs Hauke Mehrtens

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1309385518-12097-3-git-send-email-hauke@hauke-m.de \
    --to=hauke@hauke-m.de \
    --cc=arend@broadcom.com \
    --cc=arnd@arndb.de \
    --cc=b43-dev@lists.infradead.org \
    --cc=bernhardloos@googlemail.com \
    --cc=george@znau.edu.ua \
    --cc=julian.calaby@gmail.com \
    --cc=linux-mips@linux-mips.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=mb@bu3sch.de \
    --cc=sshtylyov@mvista.com \
    --cc=zajec5@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).