public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 2/4] staging: dgap: pass "brd" as a paramter to dgap_after_config_loaded()
@ 2014-06-03  6:27 Daeseok Youn
  2014-06-03  7:22 ` Dan Carpenter
  0 siblings, 1 reply; 3+ messages in thread
From: Daeseok Youn @ 2014-06-03  6:27 UTC (permalink / raw)
  To: lidza.louina, gregkh
  Cc: markh, dan.carpenter, driverdev-devel, devel, linux-kernel

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>
---
 drivers/staging/dgap/dgap.c |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/dgap/dgap.c b/drivers/staging/dgap/dgap.c
index 9501a5e..7a07a9b 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,8 +4113,10 @@ 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)
 {
+	int board = brd->boardnum;
+
 	/*
 	 * Initialize KME waitqueues...
 	 */
-- 
1.7.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH 2/4] staging: dgap: pass "brd" as a paramter to dgap_after_config_loaded()
  2014-06-03  6:27 [PATCH 2/4] staging: dgap: pass "brd" as a paramter to dgap_after_config_loaded() Daeseok Youn
@ 2014-06-03  7:22 ` Dan Carpenter
  2014-06-03  7:55   ` DaeSeok Youn
  0 siblings, 1 reply; 3+ messages in thread
From: Dan Carpenter @ 2014-06-03  7:22 UTC (permalink / raw)
  To: Daeseok Youn; +Cc: lidza.louina, gregkh, devel, driverdev-devel, linux-kernel

On Tue, Jun 03, 2014 at 03:27:28PM +0900, Daeseok Youn wrote:
> -static int dgap_after_config_loaded(int board)
> +static int dgap_after_config_loaded(struct board_t *brd)
>  {
> +	int board = brd->boardnum;
> +

We don't need to use "board" in this function.  We can replaced
"dgap_board[board]->" with "brd->"

>  	/*
>  	 * Initialize KME waitqueues...
>  	 */

regards,
dan carpenter


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH 2/4] staging: dgap: pass "brd" as a paramter to dgap_after_config_loaded()
  2014-06-03  7:22 ` Dan Carpenter
@ 2014-06-03  7:55   ` DaeSeok Youn
  0 siblings, 0 replies; 3+ messages in thread
From: DaeSeok Youn @ 2014-06-03  7:55 UTC (permalink / raw)
  To: Dan Carpenter; +Cc: Lidza Louina, Greg KH, devel, driverdev-devel, linux-kernel

2014-06-03 16:22 GMT+09:00 Dan Carpenter <dan.carpenter@oracle.com>:
> On Tue, Jun 03, 2014 at 03:27:28PM +0900, Daeseok Youn wrote:
>> -static int dgap_after_config_loaded(int board)
>> +static int dgap_after_config_loaded(struct board_t *brd)
>>  {
>> +     int board = brd->boardnum;
>> +
>
> We don't need to use "board" in this function.  We can replaced
> "dgap_board[board]->" with "brd->"
OK. I will fix as your comment and resend.
Thanks

regards,
Daeseok Youn.
>
>>       /*
>>        * Initialize KME waitqueues...
>>        */
>
> regards,
> dan carpenter
>

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-06-03  7:55 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-06-03  6:27 [PATCH 2/4] staging: dgap: pass "brd" as a paramter to dgap_after_config_loaded() Daeseok Youn
2014-06-03  7:22 ` Dan Carpenter
2014-06-03  7:55   ` DaeSeok Youn

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox