summaryrefslogtreecommitdiff
path: root/linux/drivers/media/dvb
diff options
context:
space:
mode:
authorMichael Hunold <devnull@localhost>2005-01-21 14:45:06 +0000
committerMichael Hunold <devnull@localhost>2005-01-21 14:45:06 +0000
commitb166ed22268f79cb34ef95ce95631331381717ff (patch)
treec735880d90aa3bcfa36374817820416b38d8873a /linux/drivers/media/dvb
parent6d40e62c1ad6249ce66d56629d0c76bcd064e3fd (diff)
downloadmediapointer-dvb-s2-b166ed22268f79cb34ef95ce95631331381717ff.tar.gz
mediapointer-dvb-s2-b166ed22268f79cb34ef95ce95631331381717ff.tar.bz2
various backport from 2.6.11-rc1:
- replace static spinlock initializations with spin_lock_init() - add le16_to_cpu() macros to various values aquired via USB - add __user annotations to user space pointers
Diffstat (limited to 'linux/drivers/media/dvb')
-rw-r--r--linux/drivers/media/dvb/b2c2/b2c2-usb-core.c2
-rw-r--r--linux/drivers/media/dvb/cinergyT2/cinergyT2.c8
-rw-r--r--linux/drivers/media/dvb/ttusb-budget/dvb-ttusb-budget.c6
-rw-r--r--linux/drivers/media/dvb/ttusb-dec/ttusb_dec.c12
4 files changed, 14 insertions, 14 deletions
diff --git a/linux/drivers/media/dvb/b2c2/b2c2-usb-core.c b/linux/drivers/media/dvb/b2c2/b2c2-usb-core.c
index eedaf7c87..5d3b7f1f3 100644
--- a/linux/drivers/media/dvb/b2c2/b2c2-usb-core.c
+++ b/linux/drivers/media/dvb/b2c2/b2c2-usb-core.c
@@ -380,7 +380,7 @@ static void b2c2_exit_usb(struct usb_b2c2_usb *b2c2)
static int b2c2_init_usb(struct usb_b2c2_usb *b2c2)
{
- u16 frame_size = b2c2->uintf->cur_altsetting->endpoint[0].desc.wMaxPacketSize;
+ u16 frame_size = le16_to_cpu(b2c2->uintf->cur_altsetting->endpoint[0].desc.wMaxPacketSize);
int bufsize = B2C2_USB_NUM_ISO_URB * B2C2_USB_FRAMES_PER_ISO * frame_size,i,j,ret;
int buffer_offset = 0;
diff --git a/linux/drivers/media/dvb/cinergyT2/cinergyT2.c b/linux/drivers/media/dvb/cinergyT2/cinergyT2.c
index 9a69568a2..b1d205f52 100644
--- a/linux/drivers/media/dvb/cinergyT2/cinergyT2.c
+++ b/linux/drivers/media/dvb/cinergyT2/cinergyT2.c
@@ -541,7 +541,7 @@ static int cinergyt2_ioctl (struct inode *inode, struct file *file,
switch (cmd) {
case FE_GET_INFO:
- return copy_to_user((void*) arg, &cinergyt2_fe_info,
+ return copy_to_user((void __user*) arg, &cinergyt2_fe_info,
sizeof(struct dvb_frontend_info));
case FE_READ_STATUS:
@@ -556,7 +556,7 @@ static int cinergyt2_ioctl (struct inode *inode, struct file *file,
if (stat->lock_bits & (1 << 1))
status |= FE_HAS_VITERBI;
- return copy_to_user((void *) arg, &status, sizeof(status));
+ return copy_to_user((void __user*) arg, &status, sizeof(status));
case FE_READ_BER:
return put_user(le32_to_cpu(stat->viterbi_error_rate),
@@ -584,7 +584,7 @@ static int cinergyt2_ioctl (struct inode *inode, struct file *file,
if ((file->f_flags & O_ACCMODE) == O_RDONLY)
return -EPERM;
- if (copy_from_user(&p, (void *) arg, sizeof(p)))
+ if (copy_from_user(&p, (void __user*) arg, sizeof(p)))
return -EFAULT;
if (down_interruptible(&cinergyt2->sem))
@@ -624,7 +624,7 @@ static int cinergyt2_ioctl (struct inode *inode, struct file *file,
* for now we only fill the status field. the parameters
* are trivial to fill as soon FE_GET_FRONTEND is done.
*/
- struct dvb_frontend_event *e = (void *) arg;
+ struct dvb_frontend_event __user *e = (void __user *) arg;
if (cinergyt2->pending_fe_events == 0) {
if (file->f_flags & O_NONBLOCK)
return -EWOULDBLOCK;
diff --git a/linux/drivers/media/dvb/ttusb-budget/dvb-ttusb-budget.c b/linux/drivers/media/dvb/ttusb-budget/dvb-ttusb-budget.c
index ea73889d6..b54f1e7d9 100644
--- a/linux/drivers/media/dvb/ttusb-budget/dvb-ttusb-budget.c
+++ b/linux/drivers/media/dvb/ttusb-budget/dvb-ttusb-budget.c
@@ -1349,7 +1349,7 @@ static struct tda8083_config ttusb_novas_grundig_29504_491_config = {
static void frontend_init(struct ttusb* ttusb)
{
- switch(ttusb->dev->descriptor.idProduct) {
+ switch(le16_to_cpu(ttusb->dev->descriptor.idProduct)) {
case 0x1003: // Hauppauge/TT Nova-USB-S budget (stv0299/ALPS BSRU6(tsa5059)
// try the ALPS BSRU6 first
ttusb->fe = stv0299_attach(&alps_bsru6_config, &ttusb->i2c_adap);
@@ -1382,8 +1382,8 @@ static void frontend_init(struct ttusb* ttusb)
if (ttusb->fe == NULL) {
printk("dvb-ttusb-budget: A frontend driver was not found for device %04x/%04x\n",
- ttusb->dev->descriptor.idVendor,
- ttusb->dev->descriptor.idProduct);
+ le16_to_cpu(ttusb->dev->descriptor.idVendor),
+ le16_to_cpu(ttusb->dev->descriptor.idProduct));
} else {
if (dvb_register_frontend(ttusb->adapter, ttusb->fe)) {
printk("dvb-ttusb-budget: Frontend registration failed!\n");
diff --git a/linux/drivers/media/dvb/ttusb-dec/ttusb_dec.c b/linux/drivers/media/dvb/ttusb-dec/ttusb_dec.c
index cb56fdfee..540519142 100644
--- a/linux/drivers/media/dvb/ttusb-dec/ttusb_dec.c
+++ b/linux/drivers/media/dvb/ttusb-dec/ttusb_dec.c
@@ -1089,7 +1089,7 @@ static int ttusb_dec_alloc_iso_urbs(struct ttusb_dec *dec)
static void ttusb_dec_init_tasklet(struct ttusb_dec *dec)
{
- dec->urb_frame_list_lock = SPIN_LOCK_UNLOCKED;
+ spin_lock_init(&dec->urb_frame_list_lock);
INIT_LIST_HEAD(&dec->urb_frame_list);
tasklet_init(&dec->urb_tasklet, ttusb_dec_process_urb_frame_list,
(unsigned long)dec);
@@ -1400,7 +1400,7 @@ static void ttusb_dec_exit_tasklet(struct ttusb_dec *dec)
static void ttusb_dec_init_filters(struct ttusb_dec *dec)
{
INIT_LIST_HEAD(&dec->filter_info_list);
- dec->filter_info_list_lock = SPIN_LOCK_UNLOCKED;
+ spin_lock_init(&dec->filter_info_list_lock);
}
static void ttusb_dec_exit_filters(struct ttusb_dec *dec)
@@ -1446,7 +1446,7 @@ static int ttusb_dec_probe(struct usb_interface *intf,
memset(dec, 0, sizeof(struct ttusb_dec));
- switch (id->idProduct) {
+ switch (le16_to_cpu(id->idProduct)) {
case 0x1006:
ttusb_dec_set_model(dec, TTUSB_DEC3000S);
break;
@@ -1470,7 +1470,7 @@ static int ttusb_dec_probe(struct usb_interface *intf,
ttusb_dec_init_dvb(dec);
dec->adapter->priv = dec;
- switch (id->idProduct) {
+ switch (le16_to_cpu(id->idProduct)) {
case 0x1006:
dec->fe = ttusbdecfe_dvbs_attach(&fe_config);
break;
@@ -1483,8 +1483,8 @@ static int ttusb_dec_probe(struct usb_interface *intf,
if (dec->fe == NULL) {
printk("dvb-ttusb-dec: A frontend driver was not found for device %04x/%04x\n",
- dec->udev->descriptor.idVendor,
- dec->udev->descriptor.idProduct);
+ le16_to_cpu(dec->udev->descriptor.idVendor),
+ le16_to_cpu(dec->udev->descriptor.idProduct));
} else {
if (dvb_register_frontend(dec->adapter, dec->fe)) {
printk("budget-ci: Frontend registration failed!\n");