diff options
author | Hans Verkuil <hverkuil@xs4all.nl> | 2010-12-27 10:22:46 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2010-12-29 05:17:18 -0500 |
commit | b9218f2f15cdff8991ba041993bf40962c49fdd0 (patch) | |
tree | 98e7d9e2a5e92a9a51e8b3408e750b0c508f929d | |
parent | a519d70e0cf346e946202ffcbeaf57a1748d0c03 (diff) |
[media] saa6588: rename rds.h to saa6588.h
The naming of the media/rds.h header suggested that it was a generic
RDS header, when in fact it is just a saa6588 module API that is
internal to the kernel.
Rename the header and the struct and defines in it to make this clear.
Also removed the header include in radio-si470x.h (not used anymore)
and from ioctl-number.txt (it's internal to the kernel and never called
from userspace).
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
-rw-r--r-- | Documentation/ioctl/ioctl-number.txt | 1 | ||||
-rw-r--r-- | drivers/media/radio/si470x/radio-si470x.h | 1 | ||||
-rw-r--r-- | drivers/media/video/bt8xx/bttv-driver.c | 14 | ||||
-rw-r--r-- | drivers/media/video/saa6588.c | 14 | ||||
-rw-r--r-- | drivers/media/video/saa7134/saa7134-video.c | 14 | ||||
-rw-r--r-- | include/media/saa6588.h (renamed from include/media/rds.h) | 18 |
6 files changed, 29 insertions, 33 deletions
diff --git a/Documentation/ioctl/ioctl-number.txt b/Documentation/ioctl/ioctl-number.txt index b2400d7296ce..7edf95014e85 100644 --- a/Documentation/ioctl/ioctl-number.txt +++ b/Documentation/ioctl/ioctl-number.txt | |||
@@ -155,7 +155,6 @@ Code Seq#(hex) Include File Comments | |||
155 | 'Q' all linux/soundcard.h | 155 | 'Q' all linux/soundcard.h |
156 | 'R' 00-1F linux/random.h conflict! | 156 | 'R' 00-1F linux/random.h conflict! |
157 | 'R' 01 linux/rfkill.h conflict! | 157 | 'R' 01 linux/rfkill.h conflict! |
158 | 'R' 01-0F media/rds.h conflict! | ||
159 | 'R' C0-DF net/bluetooth/rfcomm.h | 158 | 'R' C0-DF net/bluetooth/rfcomm.h |
160 | 'S' all linux/cdrom.h conflict! | 159 | 'S' all linux/cdrom.h conflict! |
161 | 'S' 80-81 scsi/scsi_ioctl.h conflict! | 160 | 'S' 80-81 scsi/scsi_ioctl.h conflict! |
diff --git a/drivers/media/radio/si470x/radio-si470x.h b/drivers/media/radio/si470x/radio-si470x.h index b9914d7a0c9f..4a4e908db04c 100644 --- a/drivers/media/radio/si470x/radio-si470x.h +++ b/drivers/media/radio/si470x/radio-si470x.h | |||
@@ -37,7 +37,6 @@ | |||
37 | #include <linux/mutex.h> | 37 | #include <linux/mutex.h> |
38 | #include <media/v4l2-common.h> | 38 | #include <media/v4l2-common.h> |
39 | #include <media/v4l2-ioctl.h> | 39 | #include <media/v4l2-ioctl.h> |
40 | #include <media/rds.h> | ||
41 | #include <asm/unaligned.h> | 40 | #include <asm/unaligned.h> |
42 | 41 | ||
43 | 42 | ||
diff --git a/drivers/media/video/bt8xx/bttv-driver.c b/drivers/media/video/bt8xx/bttv-driver.c index 961d0805d877..849cd170b821 100644 --- a/drivers/media/video/bt8xx/bttv-driver.c +++ b/drivers/media/video/bt8xx/bttv-driver.c | |||
@@ -55,7 +55,7 @@ | |||
55 | #include <asm/io.h> | 55 | #include <asm/io.h> |
56 | #include <asm/byteorder.h> | 56 | #include <asm/byteorder.h> |
57 | 57 | ||
58 | #include <media/rds.h> | 58 | #include <media/saa6588.h> |
59 | 59 | ||
60 | 60 | ||
61 | unsigned int bttv_num; /* number of Bt848s in use */ | 61 | unsigned int bttv_num; /* number of Bt848s in use */ |
@@ -3388,7 +3388,7 @@ static int radio_release(struct file *file) | |||
3388 | { | 3388 | { |
3389 | struct bttv_fh *fh = file->private_data; | 3389 | struct bttv_fh *fh = file->private_data; |
3390 | struct bttv *btv = fh->btv; | 3390 | struct bttv *btv = fh->btv; |
3391 | struct rds_command cmd; | 3391 | struct saa6588_command cmd; |
3392 | 3392 | ||
3393 | v4l2_prio_close(&btv->prio, fh->prio); | 3393 | v4l2_prio_close(&btv->prio, fh->prio); |
3394 | file->private_data = NULL; | 3394 | file->private_data = NULL; |
@@ -3396,7 +3396,7 @@ static int radio_release(struct file *file) | |||
3396 | 3396 | ||
3397 | btv->radio_user--; | 3397 | btv->radio_user--; |
3398 | 3398 | ||
3399 | bttv_call_all(btv, core, ioctl, RDS_CMD_CLOSE, &cmd); | 3399 | bttv_call_all(btv, core, ioctl, SAA6588_CMD_CLOSE, &cmd); |
3400 | 3400 | ||
3401 | return 0; | 3401 | return 0; |
3402 | } | 3402 | } |
@@ -3523,13 +3523,13 @@ static ssize_t radio_read(struct file *file, char __user *data, | |||
3523 | { | 3523 | { |
3524 | struct bttv_fh *fh = file->private_data; | 3524 | struct bttv_fh *fh = file->private_data; |
3525 | struct bttv *btv = fh->btv; | 3525 | struct bttv *btv = fh->btv; |
3526 | struct rds_command cmd; | 3526 | struct saa6588_command cmd; |
3527 | cmd.block_count = count/3; | 3527 | cmd.block_count = count/3; |
3528 | cmd.buffer = data; | 3528 | cmd.buffer = data; |
3529 | cmd.instance = file; | 3529 | cmd.instance = file; |
3530 | cmd.result = -ENODEV; | 3530 | cmd.result = -ENODEV; |
3531 | 3531 | ||
3532 | bttv_call_all(btv, core, ioctl, RDS_CMD_READ, &cmd); | 3532 | bttv_call_all(btv, core, ioctl, SAA6588_CMD_READ, &cmd); |
3533 | 3533 | ||
3534 | return cmd.result; | 3534 | return cmd.result; |
3535 | } | 3535 | } |
@@ -3538,11 +3538,11 @@ static unsigned int radio_poll(struct file *file, poll_table *wait) | |||
3538 | { | 3538 | { |
3539 | struct bttv_fh *fh = file->private_data; | 3539 | struct bttv_fh *fh = file->private_data; |
3540 | struct bttv *btv = fh->btv; | 3540 | struct bttv *btv = fh->btv; |
3541 | struct rds_command cmd; | 3541 | struct saa6588_command cmd; |
3542 | cmd.instance = file; | 3542 | cmd.instance = file; |
3543 | cmd.event_list = wait; | 3543 | cmd.event_list = wait; |
3544 | cmd.result = -ENODEV; | 3544 | cmd.result = -ENODEV; |
3545 | bttv_call_all(btv, core, ioctl, RDS_CMD_POLL, &cmd); | 3545 | bttv_call_all(btv, core, ioctl, SAA6588_CMD_POLL, &cmd); |
3546 | 3546 | ||
3547 | return cmd.result; | 3547 | return cmd.result; |
3548 | } | 3548 | } |
diff --git a/drivers/media/video/saa6588.c b/drivers/media/video/saa6588.c index 984c0feb2a4e..99a2ac16f9e5 100644 --- a/drivers/media/video/saa6588.c +++ b/drivers/media/video/saa6588.c | |||
@@ -31,7 +31,7 @@ | |||
31 | #include <linux/wait.h> | 31 | #include <linux/wait.h> |
32 | #include <asm/uaccess.h> | 32 | #include <asm/uaccess.h> |
33 | 33 | ||
34 | #include <media/rds.h> | 34 | #include <media/saa6588.h> |
35 | #include <media/v4l2-device.h> | 35 | #include <media/v4l2-device.h> |
36 | #include <media/v4l2-chip-ident.h> | 36 | #include <media/v4l2-chip-ident.h> |
37 | 37 | ||
@@ -181,7 +181,7 @@ static int block_to_user_buf(struct saa6588 *s, unsigned char __user *user_buf) | |||
181 | return 1; | 181 | return 1; |
182 | } | 182 | } |
183 | 183 | ||
184 | static void read_from_buf(struct saa6588 *s, struct rds_command *a) | 184 | static void read_from_buf(struct saa6588 *s, struct saa6588_command *a) |
185 | { | 185 | { |
186 | unsigned long flags; | 186 | unsigned long flags; |
187 | 187 | ||
@@ -392,25 +392,25 @@ static void saa6588_configure(struct saa6588 *s) | |||
392 | static long saa6588_ioctl(struct v4l2_subdev *sd, unsigned int cmd, void *arg) | 392 | static long saa6588_ioctl(struct v4l2_subdev *sd, unsigned int cmd, void *arg) |
393 | { | 393 | { |
394 | struct saa6588 *s = to_saa6588(sd); | 394 | struct saa6588 *s = to_saa6588(sd); |
395 | struct rds_command *a = arg; | 395 | struct saa6588_command *a = arg; |
396 | 396 | ||
397 | switch (cmd) { | 397 | switch (cmd) { |
398 | /* --- open() for /dev/radio --- */ | 398 | /* --- open() for /dev/radio --- */ |
399 | case RDS_CMD_OPEN: | 399 | case SAA6588_CMD_OPEN: |
400 | a->result = 0; /* return error if chip doesn't work ??? */ | 400 | a->result = 0; /* return error if chip doesn't work ??? */ |
401 | break; | 401 | break; |
402 | /* --- close() for /dev/radio --- */ | 402 | /* --- close() for /dev/radio --- */ |
403 | case RDS_CMD_CLOSE: | 403 | case SAA6588_CMD_CLOSE: |
404 | s->data_available_for_read = 1; | 404 | s->data_available_for_read = 1; |
405 | wake_up_interruptible(&s->read_queue); | 405 | wake_up_interruptible(&s->read_queue); |
406 | a->result = 0; | 406 | a->result = 0; |
407 | break; | 407 | break; |
408 | /* --- read() for /dev/radio --- */ | 408 | /* --- read() for /dev/radio --- */ |
409 | case RDS_CMD_READ: | 409 | case SAA6588_CMD_READ: |
410 | read_from_buf(s, a); | 410 | read_from_buf(s, a); |
411 | break; | 411 | break; |
412 | /* --- poll() for /dev/radio --- */ | 412 | /* --- poll() for /dev/radio --- */ |
413 | case RDS_CMD_POLL: | 413 | case SAA6588_CMD_POLL: |
414 | a->result = 0; | 414 | a->result = 0; |
415 | if (s->data_available_for_read) { | 415 | if (s->data_available_for_read) { |
416 | a->result |= POLLIN | POLLRDNORM; | 416 | a->result |= POLLIN | POLLRDNORM; |
diff --git a/drivers/media/video/saa7134/saa7134-video.c b/drivers/media/video/saa7134/saa7134-video.c index ad22be27bd38..ee4ea5f001a8 100644 --- a/drivers/media/video/saa7134/saa7134-video.c +++ b/drivers/media/video/saa7134/saa7134-video.c | |||
@@ -30,7 +30,7 @@ | |||
30 | #include "saa7134-reg.h" | 30 | #include "saa7134-reg.h" |
31 | #include "saa7134.h" | 31 | #include "saa7134.h" |
32 | #include <media/v4l2-common.h> | 32 | #include <media/v4l2-common.h> |
33 | #include <media/rds.h> | 33 | #include <media/saa6588.h> |
34 | 34 | ||
35 | /* ------------------------------------------------------------------ */ | 35 | /* ------------------------------------------------------------------ */ |
36 | 36 | ||
@@ -1459,7 +1459,7 @@ static int video_release(struct file *file) | |||
1459 | { | 1459 | { |
1460 | struct saa7134_fh *fh = file->private_data; | 1460 | struct saa7134_fh *fh = file->private_data; |
1461 | struct saa7134_dev *dev = fh->dev; | 1461 | struct saa7134_dev *dev = fh->dev; |
1462 | struct rds_command cmd; | 1462 | struct saa6588_command cmd; |
1463 | unsigned long flags; | 1463 | unsigned long flags; |
1464 | 1464 | ||
1465 | /* turn off overlay */ | 1465 | /* turn off overlay */ |
@@ -1494,7 +1494,7 @@ static int video_release(struct file *file) | |||
1494 | 1494 | ||
1495 | saa_call_all(dev, core, s_power, 0); | 1495 | saa_call_all(dev, core, s_power, 0); |
1496 | if (fh->radio) | 1496 | if (fh->radio) |
1497 | saa_call_all(dev, core, ioctl, RDS_CMD_CLOSE, &cmd); | 1497 | saa_call_all(dev, core, ioctl, SAA6588_CMD_CLOSE, &cmd); |
1498 | 1498 | ||
1499 | /* free stuff */ | 1499 | /* free stuff */ |
1500 | videobuf_mmap_free(&fh->cap); | 1500 | videobuf_mmap_free(&fh->cap); |
@@ -1520,14 +1520,14 @@ static ssize_t radio_read(struct file *file, char __user *data, | |||
1520 | { | 1520 | { |
1521 | struct saa7134_fh *fh = file->private_data; | 1521 | struct saa7134_fh *fh = file->private_data; |
1522 | struct saa7134_dev *dev = fh->dev; | 1522 | struct saa7134_dev *dev = fh->dev; |
1523 | struct rds_command cmd; | 1523 | struct saa6588_command cmd; |
1524 | 1524 | ||
1525 | cmd.block_count = count/3; | 1525 | cmd.block_count = count/3; |
1526 | cmd.buffer = data; | 1526 | cmd.buffer = data; |
1527 | cmd.instance = file; | 1527 | cmd.instance = file; |
1528 | cmd.result = -ENODEV; | 1528 | cmd.result = -ENODEV; |
1529 | 1529 | ||
1530 | saa_call_all(dev, core, ioctl, RDS_CMD_READ, &cmd); | 1530 | saa_call_all(dev, core, ioctl, SAA6588_CMD_READ, &cmd); |
1531 | 1531 | ||
1532 | return cmd.result; | 1532 | return cmd.result; |
1533 | } | 1533 | } |
@@ -1536,12 +1536,12 @@ static unsigned int radio_poll(struct file *file, poll_table *wait) | |||
1536 | { | 1536 | { |
1537 | struct saa7134_fh *fh = file->private_data; | 1537 | struct saa7134_fh *fh = file->private_data; |
1538 | struct saa7134_dev *dev = fh->dev; | 1538 | struct saa7134_dev *dev = fh->dev; |
1539 | struct rds_command cmd; | 1539 | struct saa6588_command cmd; |
1540 | 1540 | ||
1541 | cmd.instance = file; | 1541 | cmd.instance = file; |
1542 | cmd.event_list = wait; | 1542 | cmd.event_list = wait; |
1543 | cmd.result = -ENODEV; | 1543 | cmd.result = -ENODEV; |
1544 | saa_call_all(dev, core, ioctl, RDS_CMD_POLL, &cmd); | 1544 | saa_call_all(dev, core, ioctl, SAA6588_CMD_POLL, &cmd); |
1545 | 1545 | ||
1546 | return cmd.result; | 1546 | return cmd.result; |
1547 | } | 1547 | } |
diff --git a/include/media/rds.h b/include/media/saa6588.h index a89426667618..2c3c4420a4eb 100644 --- a/include/media/rds.h +++ b/include/media/saa6588.h | |||
@@ -4,9 +4,6 @@ | |||
4 | saa6588.c and every driver (e.g. bttv-driver.c) that wants | 4 | saa6588.c and every driver (e.g. bttv-driver.c) that wants |
5 | to use the saa6588 module. | 5 | to use the saa6588 module. |
6 | 6 | ||
7 | Instead of having a separate rds.h, I'd prefer to include | ||
8 | this stuff in one of the already existing files like tuner.h | ||
9 | |||
10 | (c) 2005 by Hans J. Koch | 7 | (c) 2005 by Hans J. Koch |
11 | 8 | ||
12 | This program is free software; you can redistribute it and/or modify | 9 | This program is free software; you can redistribute it and/or modify |
@@ -25,10 +22,10 @@ | |||
25 | 22 | ||
26 | */ | 23 | */ |
27 | 24 | ||
28 | #ifndef _RDS_H | 25 | #ifndef _SAA6588_H |
29 | #define _RDS_H | 26 | #define _SAA6588_H |
30 | 27 | ||
31 | struct rds_command { | 28 | struct saa6588_command { |
32 | unsigned int block_count; | 29 | unsigned int block_count; |
33 | int result; | 30 | int result; |
34 | unsigned char __user *buffer; | 31 | unsigned char __user *buffer; |
@@ -36,9 +33,10 @@ struct rds_command { | |||
36 | poll_table *event_list; | 33 | poll_table *event_list; |
37 | }; | 34 | }; |
38 | 35 | ||
39 | #define RDS_CMD_OPEN _IOW('R',1,int) | 36 | /* These ioctls are internal to the kernel */ |
40 | #define RDS_CMD_CLOSE _IOW('R',2,int) | 37 | #define SAA6588_CMD_OPEN _IOW('R', 1, int) |
41 | #define RDS_CMD_READ _IOR('R',3,int) | 38 | #define SAA6588_CMD_CLOSE _IOW('R', 2, int) |
42 | #define RDS_CMD_POLL _IOR('R',4,int) | 39 | #define SAA6588_CMD_READ _IOR('R', 3, int) |
40 | #define SAA6588_CMD_POLL _IOR('R', 4, int) | ||
43 | 41 | ||
44 | #endif | 42 | #endif |