diff options
| -rw-r--r-- | drivers/media/usb/au0828/au0828-core.c | 2 | ||||
| -rw-r--r-- | drivers/media/usb/au0828/au0828-input.c | 4 | ||||
| -rw-r--r-- | drivers/media/usb/au0828/au0828-video.c | 63 | ||||
| -rw-r--r-- | drivers/media/usb/au0828/au0828.h | 9 |
4 files changed, 39 insertions, 39 deletions
diff --git a/drivers/media/usb/au0828/au0828-core.c b/drivers/media/usb/au0828/au0828-core.c index 2fcd17d9b1a6..a40958ad8341 100644 --- a/drivers/media/usb/au0828/au0828-core.c +++ b/drivers/media/usb/au0828/au0828-core.c | |||
| @@ -171,7 +171,7 @@ static void au0828_usb_disconnect(struct usb_interface *interface) | |||
| 171 | Set the status so poll routines can check and avoid | 171 | Set the status so poll routines can check and avoid |
| 172 | access after disconnect. | 172 | access after disconnect. |
| 173 | */ | 173 | */ |
| 174 | dev->dev_state = DEV_DISCONNECTED; | 174 | set_bit(DEV_DISCONNECTED, &dev->dev_state); |
| 175 | 175 | ||
| 176 | au0828_rc_unregister(dev); | 176 | au0828_rc_unregister(dev); |
| 177 | /* Digital TV */ | 177 | /* Digital TV */ |
diff --git a/drivers/media/usb/au0828/au0828-input.c b/drivers/media/usb/au0828/au0828-input.c index b0f067971979..3d6687f0407d 100644 --- a/drivers/media/usb/au0828/au0828-input.c +++ b/drivers/media/usb/au0828/au0828-input.c | |||
| @@ -130,7 +130,7 @@ static int au0828_get_key_au8522(struct au0828_rc *ir) | |||
| 130 | bool first = true; | 130 | bool first = true; |
| 131 | 131 | ||
| 132 | /* do nothing if device is disconnected */ | 132 | /* do nothing if device is disconnected */ |
| 133 | if (ir->dev->dev_state == DEV_DISCONNECTED) | 133 | if (test_bit(DEV_DISCONNECTED, &ir->dev->dev_state)) |
| 134 | return 0; | 134 | return 0; |
| 135 | 135 | ||
| 136 | /* Check IR int */ | 136 | /* Check IR int */ |
| @@ -260,7 +260,7 @@ static void au0828_rc_stop(struct rc_dev *rc) | |||
| 260 | cancel_delayed_work_sync(&ir->work); | 260 | cancel_delayed_work_sync(&ir->work); |
| 261 | 261 | ||
| 262 | /* do nothing if device is disconnected */ | 262 | /* do nothing if device is disconnected */ |
| 263 | if (ir->dev->dev_state != DEV_DISCONNECTED) { | 263 | if (!test_bit(DEV_DISCONNECTED, &ir->dev->dev_state)) { |
| 264 | /* Disable IR */ | 264 | /* Disable IR */ |
| 265 | au8522_rc_clear(ir, 0xe0, 1 << 4); | 265 | au8522_rc_clear(ir, 0xe0, 1 << 4); |
| 266 | } | 266 | } |
diff --git a/drivers/media/usb/au0828/au0828-video.c b/drivers/media/usb/au0828/au0828-video.c index 88dcc6e0e178..32d7db96479c 100644 --- a/drivers/media/usb/au0828/au0828-video.c +++ b/drivers/media/usb/au0828/au0828-video.c | |||
| @@ -106,14 +106,13 @@ static inline void print_err_status(struct au0828_dev *dev, | |||
| 106 | 106 | ||
| 107 | static int check_dev(struct au0828_dev *dev) | 107 | static int check_dev(struct au0828_dev *dev) |
| 108 | { | 108 | { |
| 109 | if (dev->dev_state & DEV_DISCONNECTED) { | 109 | if (test_bit(DEV_DISCONNECTED, &dev->dev_state)) { |
| 110 | pr_info("v4l2 ioctl: device not present\n"); | 110 | pr_info("v4l2 ioctl: device not present\n"); |
| 111 | return -ENODEV; | 111 | return -ENODEV; |
| 112 | } | 112 | } |
| 113 | 113 | ||
| 114 | if (dev->dev_state & DEV_MISCONFIGURED) { | 114 | if (test_bit(DEV_MISCONFIGURED, &dev->dev_state)) { |
| 115 | pr_info("v4l2 ioctl: device is misconfigured; " | 115 | pr_info("v4l2 ioctl: device is misconfigured; close and open it again\n"); |
| 116 | "close and open it again\n"); | ||
| 117 | return -EIO; | 116 | return -EIO; |
| 118 | } | 117 | } |
| 119 | return 0; | 118 | return 0; |
| @@ -521,8 +520,8 @@ static inline int au0828_isoc_copy(struct au0828_dev *dev, struct urb *urb) | |||
| 521 | if (!dev) | 520 | if (!dev) |
| 522 | return 0; | 521 | return 0; |
| 523 | 522 | ||
| 524 | if ((dev->dev_state & DEV_DISCONNECTED) || | 523 | if (test_bit(DEV_DISCONNECTED, &dev->dev_state) || |
| 525 | (dev->dev_state & DEV_MISCONFIGURED)) | 524 | test_bit(DEV_MISCONFIGURED, &dev->dev_state)) |
| 526 | return 0; | 525 | return 0; |
| 527 | 526 | ||
| 528 | if (urb->status < 0) { | 527 | if (urb->status < 0) { |
| @@ -824,10 +823,10 @@ static int au0828_stream_interrupt(struct au0828_dev *dev) | |||
| 824 | int ret = 0; | 823 | int ret = 0; |
| 825 | 824 | ||
| 826 | dev->stream_state = STREAM_INTERRUPT; | 825 | dev->stream_state = STREAM_INTERRUPT; |
| 827 | if (dev->dev_state == DEV_DISCONNECTED) | 826 | if (test_bit(DEV_DISCONNECTED, &dev->dev_state)) |
| 828 | return -ENODEV; | 827 | return -ENODEV; |
| 829 | else if (ret) { | 828 | else if (ret) { |
| 830 | dev->dev_state = DEV_MISCONFIGURED; | 829 | set_bit(DEV_MISCONFIGURED, &dev->dev_state); |
| 831 | dprintk(1, "%s device is misconfigured!\n", __func__); | 830 | dprintk(1, "%s device is misconfigured!\n", __func__); |
| 832 | return ret; | 831 | return ret; |
| 833 | } | 832 | } |
| @@ -1026,7 +1025,7 @@ static int au0828_v4l2_open(struct file *filp) | |||
| 1026 | int ret; | 1025 | int ret; |
| 1027 | 1026 | ||
| 1028 | dprintk(1, | 1027 | dprintk(1, |
| 1029 | "%s called std_set %d dev_state %d stream users %d users %d\n", | 1028 | "%s called std_set %d dev_state %ld stream users %d users %d\n", |
| 1030 | __func__, dev->std_set_in_tuner_core, dev->dev_state, | 1029 | __func__, dev->std_set_in_tuner_core, dev->dev_state, |
| 1031 | dev->streaming_users, dev->users); | 1030 | dev->streaming_users, dev->users); |
| 1032 | 1031 | ||
| @@ -1045,7 +1044,7 @@ static int au0828_v4l2_open(struct file *filp) | |||
| 1045 | au0828_analog_stream_enable(dev); | 1044 | au0828_analog_stream_enable(dev); |
| 1046 | au0828_analog_stream_reset(dev); | 1045 | au0828_analog_stream_reset(dev); |
| 1047 | dev->stream_state = STREAM_OFF; | 1046 | dev->stream_state = STREAM_OFF; |
| 1048 | dev->dev_state |= DEV_INITIALIZED; | 1047 | set_bit(DEV_INITIALIZED, &dev->dev_state); |
| 1049 | } | 1048 | } |
| 1050 | dev->users++; | 1049 | dev->users++; |
| 1051 | mutex_unlock(&dev->lock); | 1050 | mutex_unlock(&dev->lock); |
| @@ -1059,7 +1058,7 @@ static int au0828_v4l2_close(struct file *filp) | |||
| 1059 | struct video_device *vdev = video_devdata(filp); | 1058 | struct video_device *vdev = video_devdata(filp); |
| 1060 | 1059 | ||
| 1061 | dprintk(1, | 1060 | dprintk(1, |
| 1062 | "%s called std_set %d dev_state %d stream users %d users %d\n", | 1061 | "%s called std_set %d dev_state %ld stream users %d users %d\n", |
| 1063 | __func__, dev->std_set_in_tuner_core, dev->dev_state, | 1062 | __func__, dev->std_set_in_tuner_core, dev->dev_state, |
| 1064 | dev->streaming_users, dev->users); | 1063 | dev->streaming_users, dev->users); |
| 1065 | 1064 | ||
| @@ -1075,7 +1074,7 @@ static int au0828_v4l2_close(struct file *filp) | |||
| 1075 | del_timer_sync(&dev->vbi_timeout); | 1074 | del_timer_sync(&dev->vbi_timeout); |
| 1076 | } | 1075 | } |
| 1077 | 1076 | ||
| 1078 | if (dev->dev_state & DEV_DISCONNECTED) | 1077 | if (test_bit(DEV_DISCONNECTED, &dev->dev_state)) |
| 1079 | goto end; | 1078 | goto end; |
| 1080 | 1079 | ||
| 1081 | if (dev->users == 1) { | 1080 | if (dev->users == 1) { |
| @@ -1135,7 +1134,7 @@ static void au0828_init_tuner(struct au0828_dev *dev) | |||
| 1135 | .type = V4L2_TUNER_ANALOG_TV, | 1134 | .type = V4L2_TUNER_ANALOG_TV, |
| 1136 | }; | 1135 | }; |
| 1137 | 1136 | ||
| 1138 | dprintk(1, "%s called std_set %d dev_state %d\n", __func__, | 1137 | dprintk(1, "%s called std_set %d dev_state %ld\n", __func__, |
| 1139 | dev->std_set_in_tuner_core, dev->dev_state); | 1138 | dev->std_set_in_tuner_core, dev->dev_state); |
| 1140 | 1139 | ||
| 1141 | if (dev->std_set_in_tuner_core) | 1140 | if (dev->std_set_in_tuner_core) |
| @@ -1207,7 +1206,7 @@ static int vidioc_querycap(struct file *file, void *priv, | |||
| 1207 | struct video_device *vdev = video_devdata(file); | 1206 | struct video_device *vdev = video_devdata(file); |
| 1208 | struct au0828_dev *dev = video_drvdata(file); | 1207 | struct au0828_dev *dev = video_drvdata(file); |
| 1209 | 1208 | ||
| 1210 | dprintk(1, "%s called std_set %d dev_state %d\n", __func__, | 1209 | dprintk(1, "%s called std_set %d dev_state %ld\n", __func__, |
| 1211 | dev->std_set_in_tuner_core, dev->dev_state); | 1210 | dev->std_set_in_tuner_core, dev->dev_state); |
| 1212 | 1211 | ||
| 1213 | strlcpy(cap->driver, "au0828", sizeof(cap->driver)); | 1212 | strlcpy(cap->driver, "au0828", sizeof(cap->driver)); |
| @@ -1250,7 +1249,7 @@ static int vidioc_g_fmt_vid_cap(struct file *file, void *priv, | |||
| 1250 | { | 1249 | { |
| 1251 | struct au0828_dev *dev = video_drvdata(file); | 1250 | struct au0828_dev *dev = video_drvdata(file); |
| 1252 | 1251 | ||
| 1253 | dprintk(1, "%s called std_set %d dev_state %d\n", __func__, | 1252 | dprintk(1, "%s called std_set %d dev_state %ld\n", __func__, |
| 1254 | dev->std_set_in_tuner_core, dev->dev_state); | 1253 | dev->std_set_in_tuner_core, dev->dev_state); |
| 1255 | 1254 | ||
| 1256 | f->fmt.pix.width = dev->width; | 1255 | f->fmt.pix.width = dev->width; |
| @@ -1269,7 +1268,7 @@ static int vidioc_try_fmt_vid_cap(struct file *file, void *priv, | |||
| 1269 | { | 1268 | { |
| 1270 | struct au0828_dev *dev = video_drvdata(file); | 1269 | struct au0828_dev *dev = video_drvdata(file); |
| 1271 | 1270 | ||
| 1272 | dprintk(1, "%s called std_set %d dev_state %d\n", __func__, | 1271 | dprintk(1, "%s called std_set %d dev_state %ld\n", __func__, |
| 1273 | dev->std_set_in_tuner_core, dev->dev_state); | 1272 | dev->std_set_in_tuner_core, dev->dev_state); |
| 1274 | 1273 | ||
| 1275 | return au0828_set_format(dev, VIDIOC_TRY_FMT, f); | 1274 | return au0828_set_format(dev, VIDIOC_TRY_FMT, f); |
| @@ -1281,7 +1280,7 @@ static int vidioc_s_fmt_vid_cap(struct file *file, void *priv, | |||
| 1281 | struct au0828_dev *dev = video_drvdata(file); | 1280 | struct au0828_dev *dev = video_drvdata(file); |
| 1282 | int rc; | 1281 | int rc; |
| 1283 | 1282 | ||
| 1284 | dprintk(1, "%s called std_set %d dev_state %d\n", __func__, | 1283 | dprintk(1, "%s called std_set %d dev_state %ld\n", __func__, |
| 1285 | dev->std_set_in_tuner_core, dev->dev_state); | 1284 | dev->std_set_in_tuner_core, dev->dev_state); |
| 1286 | 1285 | ||
| 1287 | rc = check_dev(dev); | 1286 | rc = check_dev(dev); |
| @@ -1303,7 +1302,7 @@ static int vidioc_s_std(struct file *file, void *priv, v4l2_std_id norm) | |||
| 1303 | { | 1302 | { |
| 1304 | struct au0828_dev *dev = video_drvdata(file); | 1303 | struct au0828_dev *dev = video_drvdata(file); |
| 1305 | 1304 | ||
| 1306 | dprintk(1, "%s called std_set %d dev_state %d\n", __func__, | 1305 | dprintk(1, "%s called std_set %d dev_state %ld\n", __func__, |
| 1307 | dev->std_set_in_tuner_core, dev->dev_state); | 1306 | dev->std_set_in_tuner_core, dev->dev_state); |
| 1308 | 1307 | ||
| 1309 | if (norm == dev->std) | 1308 | if (norm == dev->std) |
| @@ -1335,7 +1334,7 @@ static int vidioc_g_std(struct file *file, void *priv, v4l2_std_id *norm) | |||
| 1335 | { | 1334 | { |
| 1336 | struct au0828_dev *dev = video_drvdata(file); | 1335 | struct au0828_dev *dev = video_drvdata(file); |
| 1337 | 1336 | ||
| 1338 | dprintk(1, "%s called std_set %d dev_state %d\n", __func__, | 1337 | dprintk(1, "%s called std_set %d dev_state %ld\n", __func__, |
| 1339 | dev->std_set_in_tuner_core, dev->dev_state); | 1338 | dev->std_set_in_tuner_core, dev->dev_state); |
| 1340 | 1339 | ||
| 1341 | *norm = dev->std; | 1340 | *norm = dev->std; |
| @@ -1357,7 +1356,7 @@ static int vidioc_enum_input(struct file *file, void *priv, | |||
| 1357 | [AU0828_VMUX_DVB] = "DVB", | 1356 | [AU0828_VMUX_DVB] = "DVB", |
| 1358 | }; | 1357 | }; |
| 1359 | 1358 | ||
| 1360 | dprintk(1, "%s called std_set %d dev_state %d\n", __func__, | 1359 | dprintk(1, "%s called std_set %d dev_state %ld\n", __func__, |
| 1361 | dev->std_set_in_tuner_core, dev->dev_state); | 1360 | dev->std_set_in_tuner_core, dev->dev_state); |
| 1362 | 1361 | ||
| 1363 | tmp = input->index; | 1362 | tmp = input->index; |
| @@ -1387,7 +1386,7 @@ static int vidioc_g_input(struct file *file, void *priv, unsigned int *i) | |||
| 1387 | { | 1386 | { |
| 1388 | struct au0828_dev *dev = video_drvdata(file); | 1387 | struct au0828_dev *dev = video_drvdata(file); |
| 1389 | 1388 | ||
| 1390 | dprintk(1, "%s called std_set %d dev_state %d\n", __func__, | 1389 | dprintk(1, "%s called std_set %d dev_state %ld\n", __func__, |
| 1391 | dev->std_set_in_tuner_core, dev->dev_state); | 1390 | dev->std_set_in_tuner_core, dev->dev_state); |
| 1392 | 1391 | ||
| 1393 | *i = dev->ctrl_input; | 1392 | *i = dev->ctrl_input; |
| @@ -1398,7 +1397,7 @@ static void au0828_s_input(struct au0828_dev *dev, int index) | |||
| 1398 | { | 1397 | { |
| 1399 | int i; | 1398 | int i; |
| 1400 | 1399 | ||
| 1401 | dprintk(1, "%s called std_set %d dev_state %d\n", __func__, | 1400 | dprintk(1, "%s called std_set %d dev_state %ld\n", __func__, |
| 1402 | dev->std_set_in_tuner_core, dev->dev_state); | 1401 | dev->std_set_in_tuner_core, dev->dev_state); |
| 1403 | 1402 | ||
| 1404 | switch (AUVI_INPUT(index).type) { | 1403 | switch (AUVI_INPUT(index).type) { |
| @@ -1496,7 +1495,7 @@ static int vidioc_g_audio(struct file *file, void *priv, struct v4l2_audio *a) | |||
| 1496 | { | 1495 | { |
| 1497 | struct au0828_dev *dev = video_drvdata(file); | 1496 | struct au0828_dev *dev = video_drvdata(file); |
| 1498 | 1497 | ||
| 1499 | dprintk(1, "%s called std_set %d dev_state %d\n", __func__, | 1498 | dprintk(1, "%s called std_set %d dev_state %ld\n", __func__, |
| 1500 | dev->std_set_in_tuner_core, dev->dev_state); | 1499 | dev->std_set_in_tuner_core, dev->dev_state); |
| 1501 | 1500 | ||
| 1502 | a->index = dev->ctrl_ainput; | 1501 | a->index = dev->ctrl_ainput; |
| @@ -1516,7 +1515,7 @@ static int vidioc_s_audio(struct file *file, void *priv, const struct v4l2_audio | |||
| 1516 | if (a->index != dev->ctrl_ainput) | 1515 | if (a->index != dev->ctrl_ainput) |
| 1517 | return -EINVAL; | 1516 | return -EINVAL; |
| 1518 | 1517 | ||
| 1519 | dprintk(1, "%s called std_set %d dev_state %d\n", __func__, | 1518 | dprintk(1, "%s called std_set %d dev_state %ld\n", __func__, |
| 1520 | dev->std_set_in_tuner_core, dev->dev_state); | 1519 | dev->std_set_in_tuner_core, dev->dev_state); |
| 1521 | return 0; | 1520 | return 0; |
| 1522 | } | 1521 | } |
| @@ -1534,7 +1533,7 @@ static int vidioc_g_tuner(struct file *file, void *priv, struct v4l2_tuner *t) | |||
| 1534 | if (ret) | 1533 | if (ret) |
| 1535 | return ret; | 1534 | return ret; |
| 1536 | 1535 | ||
| 1537 | dprintk(1, "%s called std_set %d dev_state %d\n", __func__, | 1536 | dprintk(1, "%s called std_set %d dev_state %ld\n", __func__, |
| 1538 | dev->std_set_in_tuner_core, dev->dev_state); | 1537 | dev->std_set_in_tuner_core, dev->dev_state); |
| 1539 | 1538 | ||
| 1540 | strcpy(t->name, "Auvitek tuner"); | 1539 | strcpy(t->name, "Auvitek tuner"); |
| @@ -1554,7 +1553,7 @@ static int vidioc_s_tuner(struct file *file, void *priv, | |||
| 1554 | if (t->index != 0) | 1553 | if (t->index != 0) |
| 1555 | return -EINVAL; | 1554 | return -EINVAL; |
| 1556 | 1555 | ||
| 1557 | dprintk(1, "%s called std_set %d dev_state %d\n", __func__, | 1556 | dprintk(1, "%s called std_set %d dev_state %ld\n", __func__, |
| 1558 | dev->std_set_in_tuner_core, dev->dev_state); | 1557 | dev->std_set_in_tuner_core, dev->dev_state); |
| 1559 | 1558 | ||
| 1560 | au0828_init_tuner(dev); | 1559 | au0828_init_tuner(dev); |
| @@ -1576,7 +1575,7 @@ static int vidioc_g_frequency(struct file *file, void *priv, | |||
| 1576 | 1575 | ||
| 1577 | if (freq->tuner != 0) | 1576 | if (freq->tuner != 0) |
| 1578 | return -EINVAL; | 1577 | return -EINVAL; |
| 1579 | dprintk(1, "%s called std_set %d dev_state %d\n", __func__, | 1578 | dprintk(1, "%s called std_set %d dev_state %ld\n", __func__, |
| 1580 | dev->std_set_in_tuner_core, dev->dev_state); | 1579 | dev->std_set_in_tuner_core, dev->dev_state); |
| 1581 | freq->frequency = dev->ctrl_freq; | 1580 | freq->frequency = dev->ctrl_freq; |
| 1582 | return 0; | 1581 | return 0; |
| @@ -1591,7 +1590,7 @@ static int vidioc_s_frequency(struct file *file, void *priv, | |||
| 1591 | if (freq->tuner != 0) | 1590 | if (freq->tuner != 0) |
| 1592 | return -EINVAL; | 1591 | return -EINVAL; |
| 1593 | 1592 | ||
| 1594 | dprintk(1, "%s called std_set %d dev_state %d\n", __func__, | 1593 | dprintk(1, "%s called std_set %d dev_state %ld\n", __func__, |
| 1595 | dev->std_set_in_tuner_core, dev->dev_state); | 1594 | dev->std_set_in_tuner_core, dev->dev_state); |
| 1596 | 1595 | ||
| 1597 | au0828_init_tuner(dev); | 1596 | au0828_init_tuner(dev); |
| @@ -1617,7 +1616,7 @@ static int vidioc_g_fmt_vbi_cap(struct file *file, void *priv, | |||
| 1617 | { | 1616 | { |
| 1618 | struct au0828_dev *dev = video_drvdata(file); | 1617 | struct au0828_dev *dev = video_drvdata(file); |
| 1619 | 1618 | ||
| 1620 | dprintk(1, "%s called std_set %d dev_state %d\n", __func__, | 1619 | dprintk(1, "%s called std_set %d dev_state %ld\n", __func__, |
| 1621 | dev->std_set_in_tuner_core, dev->dev_state); | 1620 | dev->std_set_in_tuner_core, dev->dev_state); |
| 1622 | 1621 | ||
| 1623 | format->fmt.vbi.samples_per_line = dev->vbi_width; | 1622 | format->fmt.vbi.samples_per_line = dev->vbi_width; |
| @@ -1643,7 +1642,7 @@ static int vidioc_cropcap(struct file *file, void *priv, | |||
| 1643 | if (cc->type != V4L2_BUF_TYPE_VIDEO_CAPTURE) | 1642 | if (cc->type != V4L2_BUF_TYPE_VIDEO_CAPTURE) |
| 1644 | return -EINVAL; | 1643 | return -EINVAL; |
| 1645 | 1644 | ||
| 1646 | dprintk(1, "%s called std_set %d dev_state %d\n", __func__, | 1645 | dprintk(1, "%s called std_set %d dev_state %ld\n", __func__, |
| 1647 | dev->std_set_in_tuner_core, dev->dev_state); | 1646 | dev->std_set_in_tuner_core, dev->dev_state); |
| 1648 | 1647 | ||
| 1649 | cc->bounds.left = 0; | 1648 | cc->bounds.left = 0; |
| @@ -1665,7 +1664,7 @@ static int vidioc_g_register(struct file *file, void *priv, | |||
| 1665 | { | 1664 | { |
| 1666 | struct au0828_dev *dev = video_drvdata(file); | 1665 | struct au0828_dev *dev = video_drvdata(file); |
| 1667 | 1666 | ||
| 1668 | dprintk(1, "%s called std_set %d dev_state %d\n", __func__, | 1667 | dprintk(1, "%s called std_set %d dev_state %ld\n", __func__, |
| 1669 | dev->std_set_in_tuner_core, dev->dev_state); | 1668 | dev->std_set_in_tuner_core, dev->dev_state); |
| 1670 | 1669 | ||
| 1671 | reg->val = au0828_read(dev, reg->reg); | 1670 | reg->val = au0828_read(dev, reg->reg); |
| @@ -1678,7 +1677,7 @@ static int vidioc_s_register(struct file *file, void *priv, | |||
| 1678 | { | 1677 | { |
| 1679 | struct au0828_dev *dev = video_drvdata(file); | 1678 | struct au0828_dev *dev = video_drvdata(file); |
| 1680 | 1679 | ||
| 1681 | dprintk(1, "%s called std_set %d dev_state %d\n", __func__, | 1680 | dprintk(1, "%s called std_set %d dev_state %ld\n", __func__, |
| 1682 | dev->std_set_in_tuner_core, dev->dev_state); | 1681 | dev->std_set_in_tuner_core, dev->dev_state); |
| 1683 | 1682 | ||
| 1684 | return au0828_writereg(dev, reg->reg, reg->val); | 1683 | return au0828_writereg(dev, reg->reg, reg->val); |
diff --git a/drivers/media/usb/au0828/au0828.h b/drivers/media/usb/au0828/au0828.h index ff7f8510fb77..87f32846f1c0 100644 --- a/drivers/media/usb/au0828/au0828.h +++ b/drivers/media/usb/au0828/au0828.h | |||
| @@ -21,6 +21,7 @@ | |||
| 21 | 21 | ||
| 22 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt | 22 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt |
| 23 | 23 | ||
| 24 | #include <linux/bitops.h> | ||
| 24 | #include <linux/usb.h> | 25 | #include <linux/usb.h> |
| 25 | #include <linux/i2c.h> | 26 | #include <linux/i2c.h> |
| 26 | #include <linux/i2c-algo-bit.h> | 27 | #include <linux/i2c-algo-bit.h> |
| @@ -121,9 +122,9 @@ enum au0828_stream_state { | |||
| 121 | 122 | ||
| 122 | /* device state */ | 123 | /* device state */ |
| 123 | enum au0828_dev_state { | 124 | enum au0828_dev_state { |
| 124 | DEV_INITIALIZED = 0x01, | 125 | DEV_INITIALIZED = 0, |
| 125 | DEV_DISCONNECTED = 0x02, | 126 | DEV_DISCONNECTED = 1, |
| 126 | DEV_MISCONFIGURED = 0x04 | 127 | DEV_MISCONFIGURED = 2 |
| 127 | }; | 128 | }; |
| 128 | 129 | ||
| 129 | struct au0828_dev; | 130 | struct au0828_dev; |
| @@ -247,7 +248,7 @@ struct au0828_dev { | |||
| 247 | int input_type; | 248 | int input_type; |
| 248 | int std_set_in_tuner_core; | 249 | int std_set_in_tuner_core; |
| 249 | unsigned int ctrl_input; | 250 | unsigned int ctrl_input; |
| 250 | enum au0828_dev_state dev_state; | 251 | long unsigned int dev_state; /* defined at enum au0828_dev_state */; |
| 251 | enum au0828_stream_state stream_state; | 252 | enum au0828_stream_state stream_state; |
| 252 | wait_queue_head_t open; | 253 | wait_queue_head_t open; |
| 253 | 254 | ||
