Return-path: Received: from server19320154104.serverpool.info ([193.201.54.104]:53419 "EHLO hauke-m.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750970Ab1GVXUf (ORCPT ); Fri, 22 Jul 2011 19:20:35 -0400 From: Hauke Mehrtens To: linville@tuxdriver.com, linux-wireless@vger.kernel.org, linux-mips@linux-mips.org Cc: jonas.gorski@gmail.com, ralf@linux-mips.org, zajec5@gmail.com, 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 Subject: [PATCH 02/11] bcma: move initializing of struct bcma_bus to own function. Date: Sat, 23 Jul 2011 01:20:06 +0200 Message-Id: <1311376815-15755-3-git-send-email-hauke@hauke-m.de> (sfid-20110723_012039_518334_DE30FDD9) In-Reply-To: <1311376815-15755-1-git-send-email-hauke@hauke-m.de> References: <1311376815-15755-1-git-send-email-hauke@hauke-m.de> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-wireless-owner@vger.kernel.org List-ID: This makes it possible to use this code in some other method. Acked-by: Rafał Miłecki Signed-off-by: Hauke Mehrtens --- 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