[media] staging: as102: Declare local variables as static
authorMauro Dreissig <mukadr@gmail.com>
Tue, 26 Nov 2013 14:15:20 +0000 (11:15 -0300)
committerMauro Carvalho Chehab <m.chehab@samsung.com>
Tue, 10 Dec 2013 17:58:17 +0000 (15:58 -0200)
As pointed out by sparse:
drivers/staging/media/as102/as102_fw.c:29:6: warning: symbol 'as102_st_fw1' was not declared. Should it be static?
drivers/staging/media/as102/as102_fw.c:30:6: warning: symbol 'as102_st_fw2' was not declared. Should it be static?
drivers/staging/media/as102/as102_fw.c:31:6: warning: symbol 'as102_dt_fw1' was not declared. Should it be static?
drivers/staging/media/as102/as102_fw.c:32:6: warning: symbol 'as102_dt_fw2' was not declared. Should it be static?
drivers/staging/media/as102/as102_usb_drv.c:194:25: warning: symbol 'as102_priv_ops' was not declared. Should it be static?
Also use the const qualifier on the firmware name strings.

Signed-off-by: Mauro Dreissig <mukadr@gmail.com>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
drivers/staging/media/as102/as102_fw.c
drivers/staging/media/as102/as102_usb_drv.c

index b9670ee41b4ec3b59c07f72a514ab57a29ac4942..9e7c6d735746f17b18d0bdb836cee74b06bf52e3 100644 (file)
 #include "as102_drv.h"
 #include "as102_fw.h"
 
-char as102_st_fw1[] = "as102_data1_st.hex";
-char as102_st_fw2[] = "as102_data2_st.hex";
-char as102_dt_fw1[] = "as102_data1_dt.hex";
-char as102_dt_fw2[] = "as102_data2_dt.hex";
+static const char as102_st_fw1[] = "as102_data1_st.hex";
+static const char as102_st_fw2[] = "as102_data2_st.hex";
+static const char as102_dt_fw1[] = "as102_data1_dt.hex";
+static const char as102_dt_fw2[] = "as102_data2_dt.hex";
 
 static unsigned char atohx(unsigned char *dst, char *src)
 {
@@ -167,7 +167,7 @@ int as102_fw_upload(struct as10x_bus_adapter_t *bus_adap)
        int errno = -EFAULT;
        const struct firmware *firmware = NULL;
        unsigned char *cmd_buf = NULL;
-       char *fw1, *fw2;
+       const char *fw1, *fw2;
        struct usb_device *dev = bus_adap->usb_dev;
 
        ENTER();
index 9f275f02015044017c21196dfb883053b64b9964..0eaced3926f0e4953582db3148eee22e57a8b704 100644 (file)
@@ -191,7 +191,7 @@ static int as102_read_ep2(struct as10x_bus_adapter_t *bus_adap,
        return ret ? ret : actual_len;
 }
 
-struct as102_priv_ops_t as102_priv_ops = {
+static struct as102_priv_ops_t as102_priv_ops = {
        .upload_fw_pkt  = as102_send_ep1,
        .xfer_cmd       = as102_usb_xfer_cmd,
        .as102_read_ep2 = as102_read_ep2,