aboutsummaryrefslogtreecommitdiff
path: root/drivers/staging/dgap
diff options
context:
space:
mode:
authorDaeseok Youn <daeseok.youn@gmail.com>2014-06-03 17:01:31 +0900
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-06-19 15:22:25 -0700
commit8148f37b332a7248fbb58dd1ffbcd5dee5627704 (patch)
tree21d088370274e1117daa18b3c6c4ae3024c25f11 /drivers/staging/dgap
parentefd96189398626914a2ee016dfece6609bb9d481 (diff)
downloadlinux-stericsson-8148f37b332a7248fbb58dd1ffbcd5dee5627704.tar.gz
staging: dgap: pass "brd" as a paramter to dgap_after_config_loaded()
Pass "brd" to dgap_after_config_loaded() instead of passing "dgap_numboards" and looking up brd again. Signed-off-by: Daeseok Youn <daeseok.youn@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/dgap')
-rw-r--r--drivers/staging/dgap/dgap.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/drivers/staging/dgap/dgap.c b/drivers/staging/dgap/dgap.c
index 9501a5e45871..358718109767 100644
--- a/drivers/staging/dgap/dgap.c
+++ b/drivers/staging/dgap/dgap.c
@@ -187,7 +187,7 @@ static void dgap_do_fep_load(struct board_t *brd, const u8 *ufep, int len);
#ifdef DIGI_CONCENTRATORS_SUPPORTED
static void dgap_do_conc_load(struct board_t *brd, u8 *uaddr, int len);
#endif
-static int dgap_after_config_loaded(int board);
+static int dgap_after_config_loaded(struct board_t *brd);
static int dgap_finalize_board_init(struct board_t *brd);
static void dgap_get_vpd(struct board_t *brd);
@@ -859,7 +859,7 @@ static int dgap_firmware_load(struct pci_dev *pdev, int card_type)
kfree(dgap_config_buf);
}
- ret = dgap_after_config_loaded(brd->boardnum);
+ ret = dgap_after_config_loaded(brd);
if (ret)
return ret;
/*
@@ -4113,23 +4113,23 @@ static int dgap_tty_ioctl(struct tty_struct *tty, unsigned int cmd,
}
}
-static int dgap_after_config_loaded(int board)
+static int dgap_after_config_loaded(struct board_t *brd)
{
/*
* Initialize KME waitqueues...
*/
- init_waitqueue_head(&(dgap_board[board]->kme_wait));
+ init_waitqueue_head(&brd->kme_wait);
/*
* allocate flip buffer for board.
*/
- dgap_board[board]->flipbuf = kmalloc(MYFLIPLEN, GFP_KERNEL);
- if (!dgap_board[board]->flipbuf)
+ brd->flipbuf = kmalloc(MYFLIPLEN, GFP_KERNEL);
+ if (!brd->flipbuf)
return -ENOMEM;
- dgap_board[board]->flipflagbuf = kmalloc(MYFLIPLEN, GFP_KERNEL);
- if (!dgap_board[board]->flipflagbuf) {
- kfree(dgap_board[board]->flipbuf);
+ brd->flipflagbuf = kmalloc(MYFLIPLEN, GFP_KERNEL);
+ if (!brd->flipflagbuf) {
+ kfree(brd->flipbuf);
return -ENOMEM;
}