]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
m5602_core: move skeletons to the .c file
authorMauro Carvalho Chehab <mchehab@s-opensource.com>
Fri, 24 Jun 2016 12:03:17 +0000 (09:03 -0300)
committerMauro Carvalho Chehab <mchehab@s-opensource.com>
Fri, 24 Jun 2016 12:35:15 +0000 (09:35 -0300)
The mc5602_brigde.h is included at m5602 submodules. This
causes Gcc 6.1 to complain:

drivers/media/usb/gspca/m5602/m5602_bridge.h:124:28: warning: 'sensor_urb_skeleton' defined but not used [-Wunused-const-variable=]
 static const unsigned char sensor_urb_skeleton[] = {
                            ^~~~~~~~~~~~~~~~~~~
drivers/media/usb/gspca/m5602/m5602_bridge.h:119:28: warning: 'bridge_urb_skeleton' defined but not used [-Wunused-const-variable=]
 static const unsigned char bridge_urb_skeleton[] = {
                           ^~~~~~~~~~~~~~~~~~~

Let's shut up gcc 6.1 warnings by moving those data structures
to the core, as they're used only there.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
drivers/media/usb/gspca/m5602/m5602_bridge.h
drivers/media/usb/gspca/m5602/m5602_core.c

index 19eb1a64f9d6e0058b121ff39d72fe02c275f270..43ebc03d844df9bc71784e911b0f54c4363f95f9 100644 (file)
 
 /*****************************************************************************/
 
-/* A skeleton used for sending messages to the m5602 bridge */
-static const unsigned char bridge_urb_skeleton[] = {
-       0x13, 0x00, 0x81, 0x00
-};
-
-/* A skeleton used for sending messages to the sensor */
-static const unsigned char sensor_urb_skeleton[] = {
-       0x23, M5602_XB_GPIO_EN_H, 0x81, 0x06,
-       0x23, M5602_XB_MISC_CTRL, 0x81, 0x80,
-       0x13, M5602_XB_I2C_DEV_ADDR, 0x81, 0x00,
-       0x13, M5602_XB_I2C_REG_ADDR, 0x81, 0x00,
-       0x13, M5602_XB_I2C_DATA, 0x81, 0x00,
-       0x13, M5602_XB_I2C_CTRL, 0x81, 0x11
-};
-
 struct sd {
        struct gspca_dev gspca_dev;
 
index d926e62cb80beaf67017ee27662269d87b4bb7b7..e4a0658e3f833ab10132332664da0abeaf871b4e 100644 (file)
@@ -37,6 +37,21 @@ static const struct usb_device_id m5602_table[] = {
 
 MODULE_DEVICE_TABLE(usb, m5602_table);
 
+/* A skeleton used for sending messages to the sensor */
+static const unsigned char sensor_urb_skeleton[] = {
+       0x23, M5602_XB_GPIO_EN_H, 0x81, 0x06,
+       0x23, M5602_XB_MISC_CTRL, 0x81, 0x80,
+       0x13, M5602_XB_I2C_DEV_ADDR, 0x81, 0x00,
+       0x13, M5602_XB_I2C_REG_ADDR, 0x81, 0x00,
+       0x13, M5602_XB_I2C_DATA, 0x81, 0x00,
+       0x13, M5602_XB_I2C_CTRL, 0x81, 0x11
+};
+
+/* A skeleton used for sending messages to the m5602 bridge */
+static const unsigned char bridge_urb_skeleton[] = {
+       0x13, 0x00, 0x81, 0x00
+};
+
 /* Reads a byte from the m5602 */
 int m5602_read_bridge(struct sd *sd, const u8 address, u8 *i2c_data)
 {