Commit 6823627b authored by Rémi Cardona's avatar Rémi Cardona Committed by Mauro Carvalho Chehab

[media] dw2102: Declare MODULE_FIRMWARE usage

Signed-off-by: default avatarRémi Cardona <remi.cardona@smartjog.com>
Reviewed-by: default avatarAntti Palosaari <crope@iki.fi>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent df5450d5
...@@ -80,6 +80,15 @@ ...@@ -80,6 +80,15 @@
#define DW2102_RC_QUERY (0x1a00) #define DW2102_RC_QUERY (0x1a00)
#define DW2102_LED_CTRL (0x1b00) #define DW2102_LED_CTRL (0x1b00)
#define DW2101_FIRMWARE "dvb-usb-dw2101.fw"
#define DW2102_FIRMWARE "dvb-usb-dw2102.fw"
#define DW2104_FIRMWARE "dvb-usb-dw2104.fw"
#define DW3101_FIRMWARE "dvb-usb-dw3101.fw"
#define S630_FIRMWARE "dvb-usb-s630.fw"
#define S660_FIRMWARE "dvb-usb-s660.fw"
#define P1100_FIRMWARE "dvb-usb-p1100.fw"
#define P7500_FIRMWARE "dvb-usb-p7500.fw"
#define err_str "did not find the firmware file. (%s) " \ #define err_str "did not find the firmware file. (%s) " \
"Please see linux/Documentation/dvb/ for more details " \ "Please see linux/Documentation/dvb/ for more details " \
"on firmware-problems." "on firmware-problems."
...@@ -1478,13 +1487,12 @@ static int dw2102_load_firmware(struct usb_device *dev, ...@@ -1478,13 +1487,12 @@ static int dw2102_load_firmware(struct usb_device *dev,
u8 reset; u8 reset;
u8 reset16[] = {0, 0, 0, 0, 0, 0, 0}; u8 reset16[] = {0, 0, 0, 0, 0, 0, 0};
const struct firmware *fw; const struct firmware *fw;
const char *fw_2101 = "dvb-usb-dw2101.fw";
switch (dev->descriptor.idProduct) { switch (dev->descriptor.idProduct) {
case 0x2101: case 0x2101:
ret = request_firmware(&fw, fw_2101, &dev->dev); ret = request_firmware(&fw, DW2101_FIRMWARE, &dev->dev);
if (ret != 0) { if (ret != 0) {
err(err_str, fw_2101); err(err_str, DW2101_FIRMWARE);
return ret; return ret;
} }
break; break;
...@@ -1586,7 +1594,7 @@ static int dw2102_load_firmware(struct usb_device *dev, ...@@ -1586,7 +1594,7 @@ static int dw2102_load_firmware(struct usb_device *dev,
static struct dvb_usb_device_properties dw2102_properties = { static struct dvb_usb_device_properties dw2102_properties = {
.caps = DVB_USB_IS_AN_I2C_ADAPTER, .caps = DVB_USB_IS_AN_I2C_ADAPTER,
.usb_ctrl = DEVICE_SPECIFIC, .usb_ctrl = DEVICE_SPECIFIC,
.firmware = "dvb-usb-dw2102.fw", .firmware = DW2102_FIRMWARE,
.no_reconnect = 1, .no_reconnect = 1,
.i2c_algo = &dw2102_serit_i2c_algo, .i2c_algo = &dw2102_serit_i2c_algo,
...@@ -1641,7 +1649,7 @@ static struct dvb_usb_device_properties dw2102_properties = { ...@@ -1641,7 +1649,7 @@ static struct dvb_usb_device_properties dw2102_properties = {
static struct dvb_usb_device_properties dw2104_properties = { static struct dvb_usb_device_properties dw2104_properties = {
.caps = DVB_USB_IS_AN_I2C_ADAPTER, .caps = DVB_USB_IS_AN_I2C_ADAPTER,
.usb_ctrl = DEVICE_SPECIFIC, .usb_ctrl = DEVICE_SPECIFIC,
.firmware = "dvb-usb-dw2104.fw", .firmware = DW2104_FIRMWARE,
.no_reconnect = 1, .no_reconnect = 1,
.i2c_algo = &dw2104_i2c_algo, .i2c_algo = &dw2104_i2c_algo,
...@@ -1691,7 +1699,7 @@ static struct dvb_usb_device_properties dw2104_properties = { ...@@ -1691,7 +1699,7 @@ static struct dvb_usb_device_properties dw2104_properties = {
static struct dvb_usb_device_properties dw3101_properties = { static struct dvb_usb_device_properties dw3101_properties = {
.caps = DVB_USB_IS_AN_I2C_ADAPTER, .caps = DVB_USB_IS_AN_I2C_ADAPTER,
.usb_ctrl = DEVICE_SPECIFIC, .usb_ctrl = DEVICE_SPECIFIC,
.firmware = "dvb-usb-dw3101.fw", .firmware = DW3101_FIRMWARE,
.no_reconnect = 1, .no_reconnect = 1,
.i2c_algo = &dw3101_i2c_algo, .i2c_algo = &dw3101_i2c_algo,
...@@ -1739,7 +1747,7 @@ static struct dvb_usb_device_properties s6x0_properties = { ...@@ -1739,7 +1747,7 @@ static struct dvb_usb_device_properties s6x0_properties = {
.caps = DVB_USB_IS_AN_I2C_ADAPTER, .caps = DVB_USB_IS_AN_I2C_ADAPTER,
.usb_ctrl = DEVICE_SPECIFIC, .usb_ctrl = DEVICE_SPECIFIC,
.size_of_priv = sizeof(struct s6x0_state), .size_of_priv = sizeof(struct s6x0_state),
.firmware = "dvb-usb-s630.fw", .firmware = S630_FIRMWARE,
.no_reconnect = 1, .no_reconnect = 1,
.i2c_algo = &s6x0_i2c_algo, .i2c_algo = &s6x0_i2c_algo,
...@@ -1879,7 +1887,7 @@ static int dw2102_probe(struct usb_interface *intf, ...@@ -1879,7 +1887,7 @@ static int dw2102_probe(struct usb_interface *intf,
return -ENOMEM; return -ENOMEM;
/* copy default structure */ /* copy default structure */
/* fill only different fields */ /* fill only different fields */
p1100->firmware = "dvb-usb-p1100.fw"; p1100->firmware = P1100_FIRMWARE;
p1100->devices[0] = d1100; p1100->devices[0] = d1100;
p1100->rc.legacy.rc_map_table = rc_map_tbs_table; p1100->rc.legacy.rc_map_table = rc_map_tbs_table;
p1100->rc.legacy.rc_map_size = ARRAY_SIZE(rc_map_tbs_table); p1100->rc.legacy.rc_map_size = ARRAY_SIZE(rc_map_tbs_table);
...@@ -1891,7 +1899,7 @@ static int dw2102_probe(struct usb_interface *intf, ...@@ -1891,7 +1899,7 @@ static int dw2102_probe(struct usb_interface *intf,
kfree(p1100); kfree(p1100);
return -ENOMEM; return -ENOMEM;
} }
s660->firmware = "dvb-usb-s660.fw"; s660->firmware = S660_FIRMWARE;
s660->num_device_descs = 3; s660->num_device_descs = 3;
s660->devices[0] = d660; s660->devices[0] = d660;
s660->devices[1] = d480_1; s660->devices[1] = d480_1;
...@@ -1905,7 +1913,7 @@ static int dw2102_probe(struct usb_interface *intf, ...@@ -1905,7 +1913,7 @@ static int dw2102_probe(struct usb_interface *intf,
kfree(s660); kfree(s660);
return -ENOMEM; return -ENOMEM;
} }
p7500->firmware = "dvb-usb-p7500.fw"; p7500->firmware = P7500_FIRMWARE;
p7500->devices[0] = d7500; p7500->devices[0] = d7500;
p7500->rc.legacy.rc_map_table = rc_map_tbs_table; p7500->rc.legacy.rc_map_table = rc_map_tbs_table;
p7500->rc.legacy.rc_map_size = ARRAY_SIZE(rc_map_tbs_table); p7500->rc.legacy.rc_map_size = ARRAY_SIZE(rc_map_tbs_table);
...@@ -1949,3 +1957,11 @@ MODULE_DESCRIPTION("Driver for DVBWorld DVB-S 2101, 2102, DVB-S2 2104," ...@@ -1949,3 +1957,11 @@ MODULE_DESCRIPTION("Driver for DVBWorld DVB-S 2101, 2102, DVB-S2 2104,"
" Geniatech SU3000 devices"); " Geniatech SU3000 devices");
MODULE_VERSION("0.1"); MODULE_VERSION("0.1");
MODULE_LICENSE("GPL"); MODULE_LICENSE("GPL");
MODULE_FIRMWARE(DW2101_FIRMWARE);
MODULE_FIRMWARE(DW2102_FIRMWARE);
MODULE_FIRMWARE(DW2104_FIRMWARE);
MODULE_FIRMWARE(DW3101_FIRMWARE);
MODULE_FIRMWARE(S630_FIRMWARE);
MODULE_FIRMWARE(S660_FIRMWARE);
MODULE_FIRMWARE(P1100_FIRMWARE);
MODULE_FIRMWARE(P7500_FIRMWARE);
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