#include "go7007-priv.h"
+#define GO7007_FW_NAME "go7007/go7007tv.bin"
+
/* Constants used in the source firmware image to describe code segments */
#define FLAG_MODE_MJPEG (1)
default:
return -1;
}
- if (request_firmware(&fw_entry, go->board_info->firmware, go->dev)) {
+ if (request_firmware(&fw_entry, GO7007_FW_NAME, go->dev)) {
dev_err(go->dev,
"unable to load firmware from file \"%s\"\n",
- go->board_info->firmware);
+ GO7007_FW_NAME);
return -1;
}
code = kzalloc(codespace * 2, GFP_KERNEL);
if (chunk_len + 2 > srclen) {
dev_err(go->dev,
"firmware file \"%s\" appears to be corrupted\n",
- go->board_info->firmware);
+ GO7007_FW_NAME);
goto fw_failed;
}
if (chunk_flags & mode_flag) {
release_firmware(fw_entry);
return -1;
}
+
+MODULE_FIRMWARE(GO7007_FW_NAME);
};
struct go7007_usb {
- struct go7007_usb_board *board;
+ const struct go7007_usb_board *board;
struct mutex i2c_lock;
struct usb_device *usbdev;
struct urb *video_urbs[8];
/*********************** Product specification data ***********************/
-static struct go7007_usb_board board_matrix_ii = {
+static const struct go7007_usb_board board_matrix_ii = {
.flags = GO7007_USB_EZUSB,
.main_info = {
- .firmware = "go7007/go7007tv.bin",
.flags = GO7007_BOARD_HAS_AUDIO |
GO7007_BOARD_USE_ONBOARD_I2C,
.audio_flags = GO7007_AUDIO_I2S_MODE_1 |
},
};
-static struct go7007_usb_board board_matrix_reload = {
+static const struct go7007_usb_board board_matrix_reload = {
.flags = GO7007_USB_EZUSB,
.main_info = {
- .firmware = "go7007/go7007tv.bin",
.flags = GO7007_BOARD_HAS_AUDIO |
GO7007_BOARD_USE_ONBOARD_I2C,
.audio_flags = GO7007_AUDIO_I2S_MODE_1 |
},
};
-static struct go7007_usb_board board_star_trek = {
+static const struct go7007_usb_board board_star_trek = {
.flags = GO7007_USB_EZUSB | GO7007_USB_EZUSB_I2C,
.main_info = {
- .firmware = "go7007/go7007tv.bin",
.flags = GO7007_BOARD_HAS_AUDIO, /* |
GO7007_BOARD_HAS_TUNER, */
.sensor_flags = GO7007_SENSOR_656 |
},
};
-static struct go7007_usb_board board_px_tv402u = {
+static const struct go7007_usb_board board_px_tv402u = {
.flags = GO7007_USB_EZUSB | GO7007_USB_EZUSB_I2C,
.main_info = {
- .firmware = "go7007/go7007tv.bin",
.flags = GO7007_BOARD_HAS_AUDIO |
GO7007_BOARD_HAS_TUNER,
.sensor_flags = GO7007_SENSOR_656 |
},
};
-static struct go7007_usb_board board_xmen = {
+static const struct go7007_usb_board board_xmen = {
.flags = 0,
.main_info = {
- .firmware = "go7007/go7007tv.bin",
.flags = GO7007_BOARD_USE_ONBOARD_I2C,
.hpi_buffer_cap = 0,
.sensor_flags = GO7007_SENSOR_VREF_POLAR,
},
};
-static struct go7007_usb_board board_matrix_revolution = {
+static const struct go7007_usb_board board_matrix_revolution = {
.flags = GO7007_USB_EZUSB,
.main_info = {
- .firmware = "go7007/go7007tv.bin",
.flags = GO7007_BOARD_HAS_AUDIO |
GO7007_BOARD_USE_ONBOARD_I2C,
.audio_flags = GO7007_AUDIO_I2S_MODE_1 |
},
};
-static struct go7007_usb_board board_lifeview_lr192 = {
+static const struct go7007_usb_board board_lifeview_lr192 = {
.flags = GO7007_USB_EZUSB,
.main_info = {
- .firmware = "go7007/go7007tv.bin",
.flags = GO7007_BOARD_HAS_AUDIO |
GO7007_BOARD_USE_ONBOARD_I2C,
.audio_flags = GO7007_AUDIO_I2S_MODE_1 |
},
};
-static struct go7007_usb_board board_endura = {
+static const struct go7007_usb_board board_endura = {
.flags = 0,
.main_info = {
- .firmware = "go7007/go7007tv.bin",
.flags = 0,
.audio_flags = GO7007_AUDIO_I2S_MODE_1 |
GO7007_AUDIO_I2S_MASTER |
},
};
-static struct go7007_usb_board board_adlink_mpg24 = {
+static const struct go7007_usb_board board_adlink_mpg24 = {
.flags = 0,
.main_info = {
- .firmware = "go7007/go7007tv.bin",
.flags = GO7007_BOARD_USE_ONBOARD_I2C,
.audio_flags = GO7007_AUDIO_I2S_MODE_1 |
GO7007_AUDIO_I2S_MASTER |
},
};
-static struct go7007_usb_board board_sensoray_2250 = {
+static const struct go7007_usb_board board_sensoray_2250 = {
.flags = GO7007_USB_EZUSB | GO7007_USB_EZUSB_I2C,
.main_info = {
- .firmware = "go7007/go7007tv.bin",
.audio_flags = GO7007_AUDIO_I2S_MODE_1 |
GO7007_AUDIO_I2S_MASTER |
GO7007_AUDIO_WORD_16,
},
};
-MODULE_FIRMWARE("go7007/go7007tv.bin");
-
static const struct usb_device_id go7007_usb_id_table[] = {
{
.match_flags = USB_DEVICE_ID_MATCH_DEVICE_AND_VERSION |
{
struct go7007 *go;
struct go7007_usb *usb;
- struct go7007_usb_board *board;
+ const struct go7007_usb_board *board;
struct usb_device *usbdev = interface_to_usbdev(intf);
unsigned num_i2c_devs;
char *name;