From: Tobin C. Harding Date: Mon, 10 Apr 2017 03:15:38 +0000 (+1000) Subject: staging: ks7010: remove unnecessary function parameter X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=ed246b9ecc9212aa899721af74d97bbbcdc84add;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git 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 --- 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",