From ed246b9ecc9212aa899721af74d97bbbcdc84add Mon Sep 17 00:00:00 2001 From: "Tobin C. Harding" Date: Mon, 10 Apr 2017 13:15:38 +1000 Subject: [PATCH] staging: ks7010: remove unnecessary function parameter Function ks7010_upload_firmware() takes as parameters, two struct pointers, one of which is a member of the other. This is unnecessary since one can be accessed via the other. Remove function parameter and fix all call sites. Signed-off-by: Tobin C. Harding Signed-off-by: Greg Kroah-Hartman --- drivers/staging/ks7010/ks7010_sdio.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/staging/ks7010/ks7010_sdio.c b/drivers/staging/ks7010/ks7010_sdio.c index b16618b41253..f80e2533e26a 100644 --- a/drivers/staging/ks7010/ks7010_sdio.c +++ b/drivers/staging/ks7010/ks7010_sdio.c @@ -709,9 +709,9 @@ err_free_read_buf: return ret; } -static int ks7010_upload_firmware(struct ks_wlan_private *priv, - struct ks_sdio_card *card) +static int ks7010_upload_firmware(struct ks_sdio_card *card) { + struct ks_wlan_private *priv = card->priv; unsigned int size, offset, n = 0; unsigned char *rom_buf; unsigned char rw_data = 0; @@ -997,8 +997,7 @@ static int ks7010_sdio_probe(struct sdio_func *func, ks7010_init_defaults(priv); - /* Upload firmware */ - ret = ks7010_upload_firmware(priv, card); /* firmware load */ + ret = ks7010_upload_firmware(card); if (ret) { dev_err(&card->func->dev, "ks7010: firmware load failed !! return code = %d\n", -- 2.20.1