Commit 511ebc09 authored by Mauro Carvalho Chehab's avatar Mauro Carvalho Chehab

m5602_core: move skeletons to the .c file

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: default avatarMauro Carvalho Chehab <mchehab@s-opensource.com>
parent 318de791
......@@ -115,21 +115,6 @@
/*****************************************************************************/
/* 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;
......
......@@ -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)
{
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment