Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[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>

authored by

Hans Verkuil and committed by
Mauro Carvalho Chehab
b9218f2f a519d70e

+29 -33
-1
Documentation/ioctl/ioctl-number.txt
··· 155 155 'Q' all linux/soundcard.h 156 156 'R' 00-1F linux/random.h conflict! 157 157 'R' 01 linux/rfkill.h conflict! 158 - 'R' 01-0F media/rds.h conflict! 159 158 'R' C0-DF net/bluetooth/rfcomm.h 160 159 'S' all linux/cdrom.h conflict! 161 160 'S' 80-81 scsi/scsi_ioctl.h conflict!
-1
drivers/media/radio/si470x/radio-si470x.h
··· 37 37 #include <linux/mutex.h> 38 38 #include <media/v4l2-common.h> 39 39 #include <media/v4l2-ioctl.h> 40 - #include <media/rds.h> 41 40 #include <asm/unaligned.h> 42 41 43 42
+7 -7
drivers/media/video/bt8xx/bttv-driver.c
··· 55 55 #include <asm/io.h> 56 56 #include <asm/byteorder.h> 57 57 58 - #include <media/rds.h> 58 + #include <media/saa6588.h> 59 59 60 60 61 61 unsigned int bttv_num; /* number of Bt848s in use */ ··· 3388 3388 { 3389 3389 struct bttv_fh *fh = file->private_data; 3390 3390 struct bttv *btv = fh->btv; 3391 - struct rds_command cmd; 3391 + struct saa6588_command cmd; 3392 3392 3393 3393 v4l2_prio_close(&btv->prio, fh->prio); 3394 3394 file->private_data = NULL; ··· 3396 3396 3397 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 3401 return 0; 3402 3402 } ··· 3523 3523 { 3524 3524 struct bttv_fh *fh = file->private_data; 3525 3525 struct bttv *btv = fh->btv; 3526 - struct rds_command cmd; 3526 + struct saa6588_command cmd; 3527 3527 cmd.block_count = count/3; 3528 3528 cmd.buffer = data; 3529 3529 cmd.instance = file; 3530 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 3534 return cmd.result; 3535 3535 } ··· 3538 3538 { 3539 3539 struct bttv_fh *fh = file->private_data; 3540 3540 struct bttv *btv = fh->btv; 3541 - struct rds_command cmd; 3541 + struct saa6588_command cmd; 3542 3542 cmd.instance = file; 3543 3543 cmd.event_list = wait; 3544 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 3547 return cmd.result; 3548 3548 }
+7 -7
drivers/media/video/saa6588.c
··· 31 31 #include <linux/wait.h> 32 32 #include <asm/uaccess.h> 33 33 34 - #include <media/rds.h> 34 + #include <media/saa6588.h> 35 35 #include <media/v4l2-device.h> 36 36 #include <media/v4l2-chip-ident.h> 37 37 ··· 181 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 186 unsigned long flags; 187 187 ··· 392 392 static long saa6588_ioctl(struct v4l2_subdev *sd, unsigned int cmd, void *arg) 393 393 { 394 394 struct saa6588 *s = to_saa6588(sd); 395 - struct rds_command *a = arg; 395 + struct saa6588_command *a = arg; 396 396 397 397 switch (cmd) { 398 398 /* --- open() for /dev/radio --- */ 399 - case RDS_CMD_OPEN: 399 + case SAA6588_CMD_OPEN: 400 400 a->result = 0; /* return error if chip doesn't work ??? */ 401 401 break; 402 402 /* --- close() for /dev/radio --- */ 403 - case RDS_CMD_CLOSE: 403 + case SAA6588_CMD_CLOSE: 404 404 s->data_available_for_read = 1; 405 405 wake_up_interruptible(&s->read_queue); 406 406 a->result = 0; 407 407 break; 408 408 /* --- read() for /dev/radio --- */ 409 - case RDS_CMD_READ: 409 + case SAA6588_CMD_READ: 410 410 read_from_buf(s, a); 411 411 break; 412 412 /* --- poll() for /dev/radio --- */ 413 - case RDS_CMD_POLL: 413 + case SAA6588_CMD_POLL: 414 414 a->result = 0; 415 415 if (s->data_available_for_read) { 416 416 a->result |= POLLIN | POLLRDNORM;
+7 -7
drivers/media/video/saa7134/saa7134-video.c
··· 30 30 #include "saa7134-reg.h" 31 31 #include "saa7134.h" 32 32 #include <media/v4l2-common.h> 33 - #include <media/rds.h> 33 + #include <media/saa6588.h> 34 34 35 35 /* ------------------------------------------------------------------ */ 36 36 ··· 1459 1459 { 1460 1460 struct saa7134_fh *fh = file->private_data; 1461 1461 struct saa7134_dev *dev = fh->dev; 1462 - struct rds_command cmd; 1462 + struct saa6588_command cmd; 1463 1463 unsigned long flags; 1464 1464 1465 1465 /* turn off overlay */ ··· 1494 1494 1495 1495 saa_call_all(dev, core, s_power, 0); 1496 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 1499 /* free stuff */ 1500 1500 videobuf_mmap_free(&fh->cap); ··· 1520 1520 { 1521 1521 struct saa7134_fh *fh = file->private_data; 1522 1522 struct saa7134_dev *dev = fh->dev; 1523 - struct rds_command cmd; 1523 + struct saa6588_command cmd; 1524 1524 1525 1525 cmd.block_count = count/3; 1526 1526 cmd.buffer = data; 1527 1527 cmd.instance = file; 1528 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 1532 return cmd.result; 1533 1533 } ··· 1536 1536 { 1537 1537 struct saa7134_fh *fh = file->private_data; 1538 1538 struct saa7134_dev *dev = fh->dev; 1539 - struct rds_command cmd; 1539 + struct saa6588_command cmd; 1540 1540 1541 1541 cmd.instance = file; 1542 1542 cmd.event_list = wait; 1543 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 1546 return cmd.result; 1547 1547 }
+8 -10
include/media/rds.h include/media/saa6588.h
··· 4 4 saa6588.c and every driver (e.g. bttv-driver.c) that wants 5 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 7 (c) 2005 by Hans J. Koch 11 8 12 9 This program is free software; you can redistribute it and/or modify ··· 22 25 23 26 */ 24 27 25 - #ifndef _RDS_H 26 - #define _RDS_H 28 + #ifndef _SAA6588_H 29 + #define _SAA6588_H 27 30 28 - struct rds_command { 31 + struct saa6588_command { 29 32 unsigned int block_count; 30 33 int result; 31 34 unsigned char __user *buffer; ··· 33 36 poll_table *event_list; 34 37 }; 35 38 36 - #define RDS_CMD_OPEN _IOW('R',1,int) 37 - #define RDS_CMD_CLOSE _IOW('R',2,int) 38 - #define RDS_CMD_READ _IOR('R',3,int) 39 - #define RDS_CMD_POLL _IOR('R',4,int) 39 + /* These ioctls are internal to the kernel */ 40 + #define SAA6588_CMD_OPEN _IOW('R', 1, int) 41 + #define SAA6588_CMD_CLOSE _IOW('R', 2, int) 42 + #define SAA6588_CMD_READ _IOR('R', 3, int) 43 + #define SAA6588_CMD_POLL _IOR('R', 4, int) 40 44 41 45 #endif