staging: ks7010: remove unnecessary function parameter
authorTobin C. Harding <me@tobin.cc>
Mon, 10 Apr 2017 03:15:38 +0000 (13:15 +1000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 11 Apr 2017 14:00:54 +0000 (16:00 +0200)
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 <me@tobin.cc>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/ks7010/ks7010_sdio.c

index b16618b41253bbcaea6b22a8b46aa2b36c8539bc..f80e2533e26a29a0742f7dfd59d3e224486dd3ba 100644 (file)
@@ -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",