summaryrefslogtreecommitdiffstats
path: root/kernel/drivers/media/radio
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/drivers/media/radio')
-rw-r--r--kernel/drivers/media/radio/radio-si476x.c4
-rw-r--r--kernel/drivers/media/radio/radio-tea5764.c1
-rw-r--r--kernel/drivers/media/radio/radio-timb.c4
-rw-r--r--kernel/drivers/media/radio/saa7706h.c17
-rw-r--r--kernel/drivers/media/radio/si470x/radio-si470x-i2c.c9
-rw-r--r--kernel/drivers/media/radio/si470x/radio-si470x-usb.c6
-rw-r--r--kernel/drivers/media/radio/si470x/radio-si470x.h8
-rw-r--r--kernel/drivers/media/radio/si4713/si4713.c4
-rw-r--r--kernel/drivers/media/radio/tef6862.c1
-rw-r--r--kernel/drivers/media/radio/wl128x/Kconfig4
-rw-r--r--kernel/drivers/media/radio/wl128x/fmdrv.h2
-rw-r--r--kernel/drivers/media/radio/wl128x/fmdrv_common.c5
12 files changed, 26 insertions, 39 deletions
diff --git a/kernel/drivers/media/radio/radio-si476x.c b/kernel/drivers/media/radio/radio-si476x.c
index dccf58691..9cbb8cdf0 100644
--- a/kernel/drivers/media/radio/radio-si476x.c
+++ b/kernel/drivers/media/radio/radio-si476x.c
@@ -568,8 +568,8 @@ static int si476x_radio_do_post_powerup_init(struct si476x_radio *radio,
err = regcache_sync_region(radio->core->regmap,
SI476X_PROP_DIGITAL_IO_INPUT_SAMPLE_RATE,
SI476X_PROP_DIGITAL_IO_OUTPUT_FORMAT);
- if (err < 0)
- return err;
+ if (err < 0)
+ return err;
err = regcache_sync_region(radio->core->regmap,
SI476X_PROP_AUDIO_DEEMPHASIS,
diff --git a/kernel/drivers/media/radio/radio-tea5764.c b/kernel/drivers/media/radio/radio-tea5764.c
index cc3990111..a1930b300 100644
--- a/kernel/drivers/media/radio/radio-tea5764.c
+++ b/kernel/drivers/media/radio/radio-tea5764.c
@@ -526,7 +526,6 @@ MODULE_DEVICE_TABLE(i2c, tea5764_id);
static struct i2c_driver tea5764_i2c_driver = {
.driver = {
.name = "radio-tea5764",
- .owner = THIS_MODULE,
},
.probe = tea5764_i2c_probe,
.remove = tea5764_i2c_remove,
diff --git a/kernel/drivers/media/radio/radio-timb.c b/kernel/drivers/media/radio/radio-timb.c
index e6b55edc8..04baafe5e 100644
--- a/kernel/drivers/media/radio/radio-timb.c
+++ b/kernel/drivers/media/radio/radio-timb.c
@@ -138,8 +138,10 @@ static int timbradio_probe(struct platform_device *pdev)
i2c_get_adapter(pdata->i2c_adapter), pdata->tuner, NULL);
tr->sd_dsp = v4l2_i2c_new_subdev_board(&tr->v4l2_dev,
i2c_get_adapter(pdata->i2c_adapter), pdata->dsp, NULL);
- if (tr->sd_tuner == NULL || tr->sd_dsp == NULL)
+ if (tr->sd_tuner == NULL || tr->sd_dsp == NULL) {
+ err = -ENODEV;
goto err_video_req;
+ }
tr->v4l2_dev.ctrl_handler = tr->sd_dsp->ctrl_handler;
diff --git a/kernel/drivers/media/radio/saa7706h.c b/kernel/drivers/media/radio/saa7706h.c
index ec805b09c..ba8e357ba 100644
--- a/kernel/drivers/media/radio/saa7706h.c
+++ b/kernel/drivers/media/radio/saa7706h.c
@@ -336,19 +336,7 @@ static const struct v4l2_ctrl_ops saa7706h_ctrl_ops = {
.s_ctrl = saa7706h_s_ctrl,
};
-static const struct v4l2_subdev_core_ops saa7706h_core_ops = {
- .g_ext_ctrls = v4l2_subdev_g_ext_ctrls,
- .try_ext_ctrls = v4l2_subdev_try_ext_ctrls,
- .s_ext_ctrls = v4l2_subdev_s_ext_ctrls,
- .g_ctrl = v4l2_subdev_g_ctrl,
- .s_ctrl = v4l2_subdev_s_ctrl,
- .queryctrl = v4l2_subdev_queryctrl,
- .querymenu = v4l2_subdev_querymenu,
-};
-
-static const struct v4l2_subdev_ops saa7706h_ops = {
- .core = &saa7706h_core_ops,
-};
+static const struct v4l2_subdev_ops empty_ops = {};
/*
* Generic i2c probe
@@ -373,7 +361,7 @@ static int saa7706h_probe(struct i2c_client *client,
if (state == NULL)
return -ENOMEM;
sd = &state->sd;
- v4l2_i2c_subdev_init(sd, client, &saa7706h_ops);
+ v4l2_i2c_subdev_init(sd, client, &empty_ops);
v4l2_ctrl_handler_init(&state->hdl, 4);
v4l2_ctrl_new_std(&state->hdl, &saa7706h_ctrl_ops,
@@ -429,7 +417,6 @@ MODULE_DEVICE_TABLE(i2c, saa7706h_id);
static struct i2c_driver saa7706h_driver = {
.driver = {
- .owner = THIS_MODULE,
.name = DRIVER_NAME,
},
.probe = saa7706h_probe,
diff --git a/kernel/drivers/media/radio/si470x/radio-si470x-i2c.c b/kernel/drivers/media/radio/si470x/radio-si470x-i2c.c
index 2a497c80c..471d6a8ae 100644
--- a/kernel/drivers/media/radio/si470x/radio-si470x-i2c.c
+++ b/kernel/drivers/media/radio/si470x/radio-si470x-i2c.c
@@ -384,14 +384,14 @@ static int si470x_i2c_probe(struct i2c_client *client,
goto err_radio;
}
dev_info(&client->dev, "DeviceID=0x%4.4hx ChipID=0x%4.4hx\n",
- radio->registers[DEVICEID], radio->registers[CHIPID]);
- if ((radio->registers[CHIPID] & CHIPID_FIRMWARE) < RADIO_FW_VERSION) {
+ radio->registers[DEVICEID], radio->registers[SI_CHIPID]);
+ if ((radio->registers[SI_CHIPID] & SI_CHIPID_FIRMWARE) < RADIO_FW_VERSION) {
dev_warn(&client->dev,
"This driver is known to work with "
"firmware version %hu,\n", RADIO_FW_VERSION);
dev_warn(&client->dev,
"but the device has firmware version %hu.\n",
- radio->registers[CHIPID] & CHIPID_FIRMWARE);
+ radio->registers[SI_CHIPID] & SI_CHIPID_FIRMWARE);
version_warning = 1;
}
@@ -421,7 +421,8 @@ static int si470x_i2c_probe(struct i2c_client *client,
init_waitqueue_head(&radio->read_queue);
retval = request_threaded_irq(client->irq, NULL, si470x_i2c_interrupt,
- IRQF_TRIGGER_FALLING, DRIVER_NAME, radio);
+ IRQF_TRIGGER_FALLING | IRQF_ONESHOT, DRIVER_NAME,
+ radio);
if (retval) {
dev_err(&client->dev, "Failed to register interrupt\n");
goto err_rds;
diff --git a/kernel/drivers/media/radio/si470x/radio-si470x-usb.c b/kernel/drivers/media/radio/si470x/radio-si470x-usb.c
index 57f0bc3b6..091d793f6 100644
--- a/kernel/drivers/media/radio/si470x/radio-si470x-usb.c
+++ b/kernel/drivers/media/radio/si470x/radio-si470x-usb.c
@@ -686,14 +686,14 @@ static int si470x_usb_driver_probe(struct usb_interface *intf,
goto err_ctrl;
}
dev_info(&intf->dev, "DeviceID=0x%4.4hx ChipID=0x%4.4hx\n",
- radio->registers[DEVICEID], radio->registers[CHIPID]);
- if ((radio->registers[CHIPID] & CHIPID_FIRMWARE) < RADIO_FW_VERSION) {
+ radio->registers[DEVICEID], radio->registers[SI_CHIPID]);
+ if ((radio->registers[SI_CHIPID] & SI_CHIPID_FIRMWARE) < RADIO_FW_VERSION) {
dev_warn(&intf->dev,
"This driver is known to work with "
"firmware version %hu,\n", RADIO_FW_VERSION);
dev_warn(&intf->dev,
"but the device has firmware version %hu.\n",
- radio->registers[CHIPID] & CHIPID_FIRMWARE);
+ radio->registers[SI_CHIPID] & SI_CHIPID_FIRMWARE);
version_warning = 1;
}
diff --git a/kernel/drivers/media/radio/si470x/radio-si470x.h b/kernel/drivers/media/radio/si470x/radio-si470x.h
index 4b7660470..6c0ca9007 100644
--- a/kernel/drivers/media/radio/si470x/radio-si470x.h
+++ b/kernel/drivers/media/radio/si470x/radio-si470x.h
@@ -54,10 +54,10 @@
#define DEVICEID_PN 0xf000 /* bits 15..12: Part Number */
#define DEVICEID_MFGID 0x0fff /* bits 11..00: Manufacturer ID */
-#define CHIPID 1 /* Chip ID */
-#define CHIPID_REV 0xfc00 /* bits 15..10: Chip Version */
-#define CHIPID_DEV 0x0200 /* bits 09..09: Device */
-#define CHIPID_FIRMWARE 0x01ff /* bits 08..00: Firmware Version */
+#define SI_CHIPID 1 /* Chip ID */
+#define SI_CHIPID_REV 0xfc00 /* bits 15..10: Chip Version */
+#define SI_CHIPID_DEV 0x0200 /* bits 09..09: Device */
+#define SI_CHIPID_FIRMWARE 0x01ff /* bits 08..00: Firmware Version */
#define POWERCFG 2 /* Power Configuration */
#define POWERCFG_DSMUTE 0x8000 /* bits 15..15: Softmute Disable */
diff --git a/kernel/drivers/media/radio/si4713/si4713.c b/kernel/drivers/media/radio/si4713/si4713.c
index e9d03ac69..0b04b5657 100644
--- a/kernel/drivers/media/radio/si4713/si4713.c
+++ b/kernel/drivers/media/radio/si4713/si4713.c
@@ -1609,8 +1609,10 @@ static int si4713_probe(struct i2c_client *client,
return 0;
si4713_pdev = platform_device_alloc("radio-si4713", -1);
- if (!si4713_pdev)
+ if (!si4713_pdev) {
+ rval = -ENOMEM;
goto put_main_pdev;
+ }
si4713_pdev_pdata.subdev = client;
rval = platform_device_add_data(si4713_pdev, &si4713_pdev_pdata,
diff --git a/kernel/drivers/media/radio/tef6862.c b/kernel/drivers/media/radio/tef6862.c
index a9319a24c..9f879f0ec 100644
--- a/kernel/drivers/media/radio/tef6862.c
+++ b/kernel/drivers/media/radio/tef6862.c
@@ -195,7 +195,6 @@ MODULE_DEVICE_TABLE(i2c, tef6862_id);
static struct i2c_driver tef6862_driver = {
.driver = {
- .owner = THIS_MODULE,
.name = DRIVER_NAME,
},
.probe = tef6862_probe,
diff --git a/kernel/drivers/media/radio/wl128x/Kconfig b/kernel/drivers/media/radio/wl128x/Kconfig
index 9d6574beb..c9e349b16 100644
--- a/kernel/drivers/media/radio/wl128x/Kconfig
+++ b/kernel/drivers/media/radio/wl128x/Kconfig
@@ -4,8 +4,8 @@
menu "Texas Instruments WL128x FM driver (ST based)"
config RADIO_WL128X
tristate "Texas Instruments WL128x FM Radio"
- depends on VIDEO_V4L2 && RFKILL && GPIOLIB && TTY
- depends on TI_ST
+ depends on VIDEO_V4L2 && RFKILL && TTY && TI_ST
+ depends on GPIOLIB || COMPILE_TEST
help
Choose Y here if you have this FM radio chip.
diff --git a/kernel/drivers/media/radio/wl128x/fmdrv.h b/kernel/drivers/media/radio/wl128x/fmdrv.h
index a587c9bac..dd203de5d 100644
--- a/kernel/drivers/media/radio/wl128x/fmdrv.h
+++ b/kernel/drivers/media/radio/wl128x/fmdrv.h
@@ -210,7 +210,7 @@ struct fmdev {
spinlock_t resp_skb_lock; /* To protect access to received SKB */
long flag; /* FM driver state machine info */
- u8 streg_cbdata; /* status of ST registration */
+ int streg_cbdata; /* status of ST registration */
struct sk_buff_head rx_q; /* RX queue */
struct tasklet_struct rx_task; /* RX Tasklet */
diff --git a/kernel/drivers/media/radio/wl128x/fmdrv_common.c b/kernel/drivers/media/radio/wl128x/fmdrv_common.c
index 704397f3c..ebc73b034 100644
--- a/kernel/drivers/media/radio/wl128x/fmdrv_common.c
+++ b/kernel/drivers/media/radio/wl128x/fmdrv_common.c
@@ -689,7 +689,6 @@ static void fm_rx_update_af_cache(struct fmdev *fmdev, u8 af)
static void fm_rdsparse_swapbytes(struct fmdev *fmdev,
struct fm_rdsdata_format *rds_format)
{
- u8 byte1;
u8 index = 0;
u8 *rds_buff;
@@ -701,9 +700,7 @@ static void fm_rdsparse_swapbytes(struct fmdev *fmdev,
if (fmdev->asci_id != 0x6350) {
rds_buff = &rds_format->data.groupdatabuff.buff[0];
while (index + 1 < FM_RX_RDS_INFO_FIELD_MAX) {
- byte1 = rds_buff[index];
- rds_buff[index] = rds_buff[index + 1];
- rds_buff[index + 1] = byte1;
+ swap(rds_buff[index], rds_buff[index + 1]);
index += 2;
}
}