diff options
33 files changed, 393 insertions, 129 deletions
diff --git a/Documentation/video4linux/CARDLIST.cx88 b/Documentation/video4linux/CARDLIST.cx88 index 126e59d935cd..8755b3e7b09e 100644 --- a/Documentation/video4linux/CARDLIST.cx88 +++ b/Documentation/video4linux/CARDLIST.cx88 | |||
@@ -51,7 +51,7 @@ | |||
51 | 50 -> NPG Tech Real TV FM Top 10 [14f1:0842] | 51 | 50 -> NPG Tech Real TV FM Top 10 [14f1:0842] |
52 | 51 -> WinFast DTV2000 H [107d:665e] | 52 | 51 -> WinFast DTV2000 H [107d:665e] |
53 | 52 -> Geniatech DVB-S [14f1:0084] | 53 | 52 -> Geniatech DVB-S [14f1:0084] |
54 | 53 -> Hauppauge WinTV-HVR3000 TriMode Analog/DVB-S/DVB-T [0070:1404] | 54 | 53 -> Hauppauge WinTV-HVR3000 TriMode Analog/DVB-S/DVB-T [0070:1404,0070:1400,0070:1401,0070:1402] |
55 | 54 -> Norwood Micro TV Tuner | 55 | 54 -> Norwood Micro TV Tuner |
56 | 55 -> Shenzhen Tungsten Ages Tech TE-DTV-250 / Swann OEM [c180:c980] | 56 | 55 -> Shenzhen Tungsten Ages Tech TE-DTV-250 / Swann OEM [c180:c980] |
57 | 56 -> Hauppauge WinTV-HVR1300 DVB-T/Hybrid MPEG Encoder [0070:9600,0070:9601,0070:9602] | 57 | 56 -> Hauppauge WinTV-HVR1300 DVB-T/Hybrid MPEG Encoder [0070:9600,0070:9601,0070:9602] |
diff --git a/drivers/char/serial167.c b/drivers/char/serial167.c index 461bfe0234c9..3af7f0958c5d 100644 --- a/drivers/char/serial167.c +++ b/drivers/char/serial167.c | |||
@@ -839,7 +839,7 @@ shutdown(struct cyclades_port * info) | |||
839 | local_irq_save(flags); | 839 | local_irq_save(flags); |
840 | if (info->xmit_buf){ | 840 | if (info->xmit_buf){ |
841 | free_page((unsigned long) info->xmit_buf); | 841 | free_page((unsigned long) info->xmit_buf); |
842 | info->xmit_buf = 0; | 842 | info->xmit_buf = NULL; |
843 | } | 843 | } |
844 | 844 | ||
845 | base_addr[CyCAR] = (u_char)channel; | 845 | base_addr[CyCAR] = (u_char)channel; |
@@ -1354,7 +1354,7 @@ cy_unthrottle(struct tty_struct * tty) | |||
1354 | 1354 | ||
1355 | static int | 1355 | static int |
1356 | get_serial_info(struct cyclades_port * info, | 1356 | get_serial_info(struct cyclades_port * info, |
1357 | struct serial_struct * retinfo) | 1357 | struct serial_struct __user * retinfo) |
1358 | { | 1358 | { |
1359 | struct serial_struct tmp; | 1359 | struct serial_struct tmp; |
1360 | 1360 | ||
@@ -1376,7 +1376,7 @@ get_serial_info(struct cyclades_port * info, | |||
1376 | 1376 | ||
1377 | static int | 1377 | static int |
1378 | set_serial_info(struct cyclades_port * info, | 1378 | set_serial_info(struct cyclades_port * info, |
1379 | struct serial_struct * new_info) | 1379 | struct serial_struct __user * new_info) |
1380 | { | 1380 | { |
1381 | struct serial_struct new_serial; | 1381 | struct serial_struct new_serial; |
1382 | struct cyclades_port old_info; | 1382 | struct cyclades_port old_info; |
@@ -1503,7 +1503,7 @@ send_break( struct cyclades_port * info, int duration) | |||
1503 | } /* send_break */ | 1503 | } /* send_break */ |
1504 | 1504 | ||
1505 | static int | 1505 | static int |
1506 | get_mon_info(struct cyclades_port * info, struct cyclades_monitor * mon) | 1506 | get_mon_info(struct cyclades_port * info, struct cyclades_monitor __user * mon) |
1507 | { | 1507 | { |
1508 | 1508 | ||
1509 | if (copy_to_user(mon, &info->mon, sizeof(struct cyclades_monitor))) | 1509 | if (copy_to_user(mon, &info->mon, sizeof(struct cyclades_monitor))) |
@@ -1516,7 +1516,7 @@ get_mon_info(struct cyclades_port * info, struct cyclades_monitor * mon) | |||
1516 | } | 1516 | } |
1517 | 1517 | ||
1518 | static int | 1518 | static int |
1519 | set_threshold(struct cyclades_port * info, unsigned long *arg) | 1519 | set_threshold(struct cyclades_port * info, unsigned long __user *arg) |
1520 | { | 1520 | { |
1521 | volatile unsigned char *base_addr = (u_char *)BASE_ADDR; | 1521 | volatile unsigned char *base_addr = (u_char *)BASE_ADDR; |
1522 | unsigned long value; | 1522 | unsigned long value; |
@@ -1533,7 +1533,7 @@ set_threshold(struct cyclades_port * info, unsigned long *arg) | |||
1533 | } | 1533 | } |
1534 | 1534 | ||
1535 | static int | 1535 | static int |
1536 | get_threshold(struct cyclades_port * info, unsigned long *value) | 1536 | get_threshold(struct cyclades_port * info, unsigned long __user *value) |
1537 | { | 1537 | { |
1538 | volatile unsigned char *base_addr = (u_char *)BASE_ADDR; | 1538 | volatile unsigned char *base_addr = (u_char *)BASE_ADDR; |
1539 | int channel; | 1539 | int channel; |
@@ -1546,7 +1546,7 @@ get_threshold(struct cyclades_port * info, unsigned long *value) | |||
1546 | } | 1546 | } |
1547 | 1547 | ||
1548 | static int | 1548 | static int |
1549 | set_default_threshold(struct cyclades_port * info, unsigned long *arg) | 1549 | set_default_threshold(struct cyclades_port * info, unsigned long __user *arg) |
1550 | { | 1550 | { |
1551 | unsigned long value; | 1551 | unsigned long value; |
1552 | 1552 | ||
@@ -1558,13 +1558,13 @@ set_default_threshold(struct cyclades_port * info, unsigned long *arg) | |||
1558 | } | 1558 | } |
1559 | 1559 | ||
1560 | static int | 1560 | static int |
1561 | get_default_threshold(struct cyclades_port * info, unsigned long *value) | 1561 | get_default_threshold(struct cyclades_port * info, unsigned long __user *value) |
1562 | { | 1562 | { |
1563 | return put_user(info->default_threshold,value); | 1563 | return put_user(info->default_threshold,value); |
1564 | } | 1564 | } |
1565 | 1565 | ||
1566 | static int | 1566 | static int |
1567 | set_timeout(struct cyclades_port * info, unsigned long *arg) | 1567 | set_timeout(struct cyclades_port * info, unsigned long __user *arg) |
1568 | { | 1568 | { |
1569 | volatile unsigned char *base_addr = (u_char *)BASE_ADDR; | 1569 | volatile unsigned char *base_addr = (u_char *)BASE_ADDR; |
1570 | int channel; | 1570 | int channel; |
@@ -1581,7 +1581,7 @@ set_timeout(struct cyclades_port * info, unsigned long *arg) | |||
1581 | } | 1581 | } |
1582 | 1582 | ||
1583 | static int | 1583 | static int |
1584 | get_timeout(struct cyclades_port * info, unsigned long *value) | 1584 | get_timeout(struct cyclades_port * info, unsigned long __user *value) |
1585 | { | 1585 | { |
1586 | volatile unsigned char *base_addr = (u_char *)BASE_ADDR; | 1586 | volatile unsigned char *base_addr = (u_char *)BASE_ADDR; |
1587 | int channel; | 1587 | int channel; |
@@ -1601,7 +1601,7 @@ set_default_timeout(struct cyclades_port * info, unsigned long value) | |||
1601 | } | 1601 | } |
1602 | 1602 | ||
1603 | static int | 1603 | static int |
1604 | get_default_timeout(struct cyclades_port * info, unsigned long *value) | 1604 | get_default_timeout(struct cyclades_port * info, unsigned long __user *value) |
1605 | { | 1605 | { |
1606 | return put_user(info->default_timeout,value); | 1606 | return put_user(info->default_timeout,value); |
1607 | } | 1607 | } |
@@ -1613,6 +1613,7 @@ cy_ioctl(struct tty_struct *tty, struct file * file, | |||
1613 | unsigned long val; | 1613 | unsigned long val; |
1614 | struct cyclades_port * info = (struct cyclades_port *)tty->driver_data; | 1614 | struct cyclades_port * info = (struct cyclades_port *)tty->driver_data; |
1615 | int ret_val = 0; | 1615 | int ret_val = 0; |
1616 | void __user *argp = (void __user *)arg; | ||
1616 | 1617 | ||
1617 | #ifdef SERIAL_DEBUG_OTHER | 1618 | #ifdef SERIAL_DEBUG_OTHER |
1618 | printk("cy_ioctl %s, cmd = %x arg = %lx\n", tty->name, cmd, arg); /* */ | 1619 | printk("cy_ioctl %s, cmd = %x arg = %lx\n", tty->name, cmd, arg); /* */ |
@@ -1620,28 +1621,28 @@ cy_ioctl(struct tty_struct *tty, struct file * file, | |||
1620 | 1621 | ||
1621 | switch (cmd) { | 1622 | switch (cmd) { |
1622 | case CYGETMON: | 1623 | case CYGETMON: |
1623 | ret_val = get_mon_info(info, (struct cyclades_monitor *)arg); | 1624 | ret_val = get_mon_info(info, argp); |
1624 | break; | 1625 | break; |
1625 | case CYGETTHRESH: | 1626 | case CYGETTHRESH: |
1626 | ret_val = get_threshold(info, (unsigned long *)arg); | 1627 | ret_val = get_threshold(info, argp); |
1627 | break; | 1628 | break; |
1628 | case CYSETTHRESH: | 1629 | case CYSETTHRESH: |
1629 | ret_val = set_threshold(info, (unsigned long *)arg); | 1630 | ret_val = set_threshold(info, argp); |
1630 | break; | 1631 | break; |
1631 | case CYGETDEFTHRESH: | 1632 | case CYGETDEFTHRESH: |
1632 | ret_val = get_default_threshold(info, (unsigned long *)arg); | 1633 | ret_val = get_default_threshold(info, argp); |
1633 | break; | 1634 | break; |
1634 | case CYSETDEFTHRESH: | 1635 | case CYSETDEFTHRESH: |
1635 | ret_val = set_default_threshold(info, (unsigned long *)arg); | 1636 | ret_val = set_default_threshold(info, argp); |
1636 | break; | 1637 | break; |
1637 | case CYGETTIMEOUT: | 1638 | case CYGETTIMEOUT: |
1638 | ret_val = get_timeout(info, (unsigned long *)arg); | 1639 | ret_val = get_timeout(info, argp); |
1639 | break; | 1640 | break; |
1640 | case CYSETTIMEOUT: | 1641 | case CYSETTIMEOUT: |
1641 | ret_val = set_timeout(info, (unsigned long *)arg); | 1642 | ret_val = set_timeout(info, argp); |
1642 | break; | 1643 | break; |
1643 | case CYGETDEFTIMEOUT: | 1644 | case CYGETDEFTIMEOUT: |
1644 | ret_val = get_default_timeout(info, (unsigned long *)arg); | 1645 | ret_val = get_default_timeout(info, argp); |
1645 | break; | 1646 | break; |
1646 | case CYSETDEFTIMEOUT: | 1647 | case CYSETDEFTIMEOUT: |
1647 | ret_val = set_default_timeout(info, (unsigned long)arg); | 1648 | ret_val = set_default_timeout(info, (unsigned long)arg); |
@@ -1664,21 +1665,20 @@ cy_ioctl(struct tty_struct *tty, struct file * file, | |||
1664 | 1665 | ||
1665 | /* The following commands are incompletely implemented!!! */ | 1666 | /* The following commands are incompletely implemented!!! */ |
1666 | case TIOCGSOFTCAR: | 1667 | case TIOCGSOFTCAR: |
1667 | ret_val = put_user(C_CLOCAL(tty) ? 1 : 0, (unsigned long *) arg); | 1668 | ret_val = put_user(C_CLOCAL(tty) ? 1 : 0, (unsigned long __user *) argp); |
1668 | break; | 1669 | break; |
1669 | case TIOCSSOFTCAR: | 1670 | case TIOCSSOFTCAR: |
1670 | ret_val = get_user(val, (unsigned long *) arg); | 1671 | ret_val = get_user(val, (unsigned long __user *) argp); |
1671 | if (ret_val) | 1672 | if (ret_val) |
1672 | break; | 1673 | break; |
1673 | tty->termios->c_cflag = | 1674 | tty->termios->c_cflag = |
1674 | ((tty->termios->c_cflag & ~CLOCAL) | (val ? CLOCAL : 0)); | 1675 | ((tty->termios->c_cflag & ~CLOCAL) | (val ? CLOCAL : 0)); |
1675 | break; | 1676 | break; |
1676 | case TIOCGSERIAL: | 1677 | case TIOCGSERIAL: |
1677 | ret_val = get_serial_info(info, (struct serial_struct *) arg); | 1678 | ret_val = get_serial_info(info, argp); |
1678 | break; | 1679 | break; |
1679 | case TIOCSSERIAL: | 1680 | case TIOCSSERIAL: |
1680 | ret_val = set_serial_info(info, | 1681 | ret_val = set_serial_info(info, argp); |
1681 | (struct serial_struct *) arg); | ||
1682 | break; | 1682 | break; |
1683 | default: | 1683 | default: |
1684 | ret_val = -ENOIOCTLCMD; | 1684 | ret_val = -ENOIOCTLCMD; |
@@ -1773,7 +1773,7 @@ cy_close(struct tty_struct * tty, struct file * filp) | |||
1773 | tty->driver->flush_buffer(tty); | 1773 | tty->driver->flush_buffer(tty); |
1774 | tty_ldisc_flush(tty); | 1774 | tty_ldisc_flush(tty); |
1775 | info->event = 0; | 1775 | info->event = 0; |
1776 | info->tty = 0; | 1776 | info->tty = NULL; |
1777 | if (info->blocked_open) { | 1777 | if (info->blocked_open) { |
1778 | if (info->close_delay) { | 1778 | if (info->close_delay) { |
1779 | msleep_interruptible(jiffies_to_msecs(info->close_delay)); | 1779 | msleep_interruptible(jiffies_to_msecs(info->close_delay)); |
@@ -2250,7 +2250,7 @@ scrn[1] = '\0'; | |||
2250 | info->card = index; | 2250 | info->card = index; |
2251 | info->line = port_num; | 2251 | info->line = port_num; |
2252 | info->flags = STD_COM_FLAGS; | 2252 | info->flags = STD_COM_FLAGS; |
2253 | info->tty = 0; | 2253 | info->tty = NULL; |
2254 | info->xmit_fifo_size = 12; | 2254 | info->xmit_fifo_size = 12; |
2255 | info->cor1 = CyPARITY_NONE|Cy_8_BITS; | 2255 | info->cor1 = CyPARITY_NONE|Cy_8_BITS; |
2256 | info->cor2 = CyETC; | 2256 | info->cor2 = CyETC; |
diff --git a/drivers/input/misc/hp_sdc_rtc.c b/drivers/input/misc/hp_sdc_rtc.c index 1be963961c15..ab4da79ee560 100644 --- a/drivers/input/misc/hp_sdc_rtc.c +++ b/drivers/input/misc/hp_sdc_rtc.c | |||
@@ -60,7 +60,7 @@ static struct fasync_struct *hp_sdc_rtc_async_queue; | |||
60 | 60 | ||
61 | static DECLARE_WAIT_QUEUE_HEAD(hp_sdc_rtc_wait); | 61 | static DECLARE_WAIT_QUEUE_HEAD(hp_sdc_rtc_wait); |
62 | 62 | ||
63 | static ssize_t hp_sdc_rtc_read(struct file *file, char *buf, | 63 | static ssize_t hp_sdc_rtc_read(struct file *file, char __user *buf, |
64 | size_t count, loff_t *ppos); | 64 | size_t count, loff_t *ppos); |
65 | 65 | ||
66 | static int hp_sdc_rtc_ioctl(struct inode *inode, struct file *file, | 66 | static int hp_sdc_rtc_ioctl(struct inode *inode, struct file *file, |
@@ -385,14 +385,14 @@ static int hp_sdc_rtc_set_i8042timer (struct timeval *setto, uint8_t setcmd) | |||
385 | return 0; | 385 | return 0; |
386 | } | 386 | } |
387 | 387 | ||
388 | static ssize_t hp_sdc_rtc_read(struct file *file, char *buf, | 388 | static ssize_t hp_sdc_rtc_read(struct file *file, char __user *buf, |
389 | size_t count, loff_t *ppos) { | 389 | size_t count, loff_t *ppos) { |
390 | ssize_t retval; | 390 | ssize_t retval; |
391 | 391 | ||
392 | if (count < sizeof(unsigned long)) | 392 | if (count < sizeof(unsigned long)) |
393 | return -EINVAL; | 393 | return -EINVAL; |
394 | 394 | ||
395 | retval = put_user(68, (unsigned long *)buf); | 395 | retval = put_user(68, (unsigned long __user *)buf); |
396 | return retval; | 396 | return retval; |
397 | } | 397 | } |
398 | 398 | ||
@@ -696,7 +696,7 @@ static int __init hp_sdc_rtc_init(void) | |||
696 | if ((ret = hp_sdc_request_timer_irq(&hp_sdc_rtc_isr))) | 696 | if ((ret = hp_sdc_request_timer_irq(&hp_sdc_rtc_isr))) |
697 | return ret; | 697 | return ret; |
698 | misc_register(&hp_sdc_rtc_dev); | 698 | misc_register(&hp_sdc_rtc_dev); |
699 | create_proc_read_entry ("driver/rtc", 0, 0, | 699 | create_proc_read_entry ("driver/rtc", 0, NULL, |
700 | hp_sdc_rtc_read_proc, NULL); | 700 | hp_sdc_rtc_read_proc, NULL); |
701 | 701 | ||
702 | printk(KERN_INFO "HP i8042 SDC + MSM-58321 RTC support loaded " | 702 | printk(KERN_INFO "HP i8042 SDC + MSM-58321 RTC support loaded " |
diff --git a/drivers/input/serio/hil_mlc.c b/drivers/input/serio/hil_mlc.c index bdfde046b741..49e11e2c1d5d 100644 --- a/drivers/input/serio/hil_mlc.c +++ b/drivers/input/serio/hil_mlc.c | |||
@@ -391,23 +391,23 @@ static int hilse_operate(hil_mlc *mlc, int repoll) { | |||
391 | } | 391 | } |
392 | 392 | ||
393 | #define FUNC(funct, funct_arg, zero_rc, neg_rc, pos_rc) \ | 393 | #define FUNC(funct, funct_arg, zero_rc, neg_rc, pos_rc) \ |
394 | { HILSE_FUNC, { func: &funct }, funct_arg, zero_rc, neg_rc, pos_rc }, | 394 | { HILSE_FUNC, { .func = funct }, funct_arg, zero_rc, neg_rc, pos_rc }, |
395 | #define OUT(pack) \ | 395 | #define OUT(pack) \ |
396 | { HILSE_OUT, { packet: pack }, 0, HILSEN_NEXT, HILSEN_DOZE, 0 }, | 396 | { HILSE_OUT, { .packet = pack }, 0, HILSEN_NEXT, HILSEN_DOZE, 0 }, |
397 | #define CTS \ | 397 | #define CTS \ |
398 | { HILSE_CTS, { packet: 0 }, 0, HILSEN_NEXT | HILSEN_SCHED | HILSEN_BREAK, HILSEN_DOZE, 0 }, | 398 | { HILSE_CTS, { .packet = 0 }, 0, HILSEN_NEXT | HILSEN_SCHED | HILSEN_BREAK, HILSEN_DOZE, 0 }, |
399 | #define EXPECT(comp, to, got, got_wrong, timed_out) \ | 399 | #define EXPECT(comp, to, got, got_wrong, timed_out) \ |
400 | { HILSE_EXPECT, { packet: comp }, to, got, got_wrong, timed_out }, | 400 | { HILSE_EXPECT, { .packet = comp }, to, got, got_wrong, timed_out }, |
401 | #define EXPECT_LAST(comp, to, got, got_wrong, timed_out) \ | 401 | #define EXPECT_LAST(comp, to, got, got_wrong, timed_out) \ |
402 | { HILSE_EXPECT_LAST, { packet: comp }, to, got, got_wrong, timed_out }, | 402 | { HILSE_EXPECT_LAST, { .packet = comp }, to, got, got_wrong, timed_out }, |
403 | #define EXPECT_DISC(comp, to, got, got_wrong, timed_out) \ | 403 | #define EXPECT_DISC(comp, to, got, got_wrong, timed_out) \ |
404 | { HILSE_EXPECT_DISC, { packet: comp }, to, got, got_wrong, timed_out }, | 404 | { HILSE_EXPECT_DISC, { .packet = comp }, to, got, got_wrong, timed_out }, |
405 | #define IN(to, got, got_error, timed_out) \ | 405 | #define IN(to, got, got_error, timed_out) \ |
406 | { HILSE_IN, { packet: 0 }, to, got, got_error, timed_out }, | 406 | { HILSE_IN, { .packet = 0 }, to, got, got_error, timed_out }, |
407 | #define OUT_DISC(pack) \ | 407 | #define OUT_DISC(pack) \ |
408 | { HILSE_OUT_DISC, { packet: pack }, 0, 0, 0, 0 }, | 408 | { HILSE_OUT_DISC, { .packet = pack }, 0, 0, 0, 0 }, |
409 | #define OUT_LAST(pack) \ | 409 | #define OUT_LAST(pack) \ |
410 | { HILSE_OUT_LAST, { packet: pack }, 0, 0, 0, 0 }, | 410 | { HILSE_OUT_LAST, { .packet = pack }, 0, 0, 0, 0 }, |
411 | 411 | ||
412 | struct hilse_node hil_mlc_se[HILSEN_END] = { | 412 | struct hilse_node hil_mlc_se[HILSEN_END] = { |
413 | 413 | ||
diff --git a/drivers/input/serio/hp_sdc.c b/drivers/input/serio/hp_sdc.c index ba7b920347e3..9907ad3bea23 100644 --- a/drivers/input/serio/hp_sdc.c +++ b/drivers/input/serio/hp_sdc.c | |||
@@ -310,7 +310,7 @@ static void hp_sdc_tasklet(unsigned long foo) { | |||
310 | * in tasklet/bh context. | 310 | * in tasklet/bh context. |
311 | */ | 311 | */ |
312 | if (curr->act.irqhook) | 312 | if (curr->act.irqhook) |
313 | curr->act.irqhook(0, 0, 0, 0); | 313 | curr->act.irqhook(0, NULL, 0, 0); |
314 | } | 314 | } |
315 | curr->actidx = curr->idx; | 315 | curr->actidx = curr->idx; |
316 | curr->idx++; | 316 | curr->idx++; |
@@ -525,7 +525,7 @@ actdone: | |||
525 | up(curr->act.semaphore); | 525 | up(curr->act.semaphore); |
526 | } | 526 | } |
527 | else if (act & HP_SDC_ACT_CALLBACK) { | 527 | else if (act & HP_SDC_ACT_CALLBACK) { |
528 | curr->act.irqhook(0,0,0,0); | 528 | curr->act.irqhook(0,NULL,0,0); |
529 | } | 529 | } |
530 | if (curr->idx >= curr->endidx) { /* This transaction is over. */ | 530 | if (curr->idx >= curr->endidx) { /* This transaction is over. */ |
531 | if (act & HP_SDC_ACT_DEALLOC) kfree(curr); | 531 | if (act & HP_SDC_ACT_DEALLOC) kfree(curr); |
diff --git a/drivers/media/dvb/bt8xx/dvb-bt8xx.c b/drivers/media/dvb/bt8xx/dvb-bt8xx.c index fb6c4cc8477d..14e69a736eda 100644 --- a/drivers/media/dvb/bt8xx/dvb-bt8xx.c +++ b/drivers/media/dvb/bt8xx/dvb-bt8xx.c | |||
@@ -665,6 +665,10 @@ static void frontend_init(struct dvb_bt8xx_card *card, u32 type) | |||
665 | case BTTV_BOARD_TWINHAN_DST: | 665 | case BTTV_BOARD_TWINHAN_DST: |
666 | /* DST is not a frontend driver !!! */ | 666 | /* DST is not a frontend driver !!! */ |
667 | state = (struct dst_state *) kmalloc(sizeof (struct dst_state), GFP_KERNEL); | 667 | state = (struct dst_state *) kmalloc(sizeof (struct dst_state), GFP_KERNEL); |
668 | if (!state) { | ||
669 | printk("dvb_bt8xx: No memory\n"); | ||
670 | break; | ||
671 | } | ||
668 | /* Setup the Card */ | 672 | /* Setup the Card */ |
669 | state->config = &dst_config; | 673 | state->config = &dst_config; |
670 | state->i2c = card->i2c_adapter; | 674 | state->i2c = card->i2c_adapter; |
diff --git a/drivers/media/dvb/dvb-core/Kconfig b/drivers/media/dvb/dvb-core/Kconfig index e46eae3b9be2..1990eda10c46 100644 --- a/drivers/media/dvb/dvb-core/Kconfig +++ b/drivers/media/dvb/dvb-core/Kconfig | |||
@@ -19,6 +19,6 @@ config DVB_CORE_ATTACH | |||
19 | allow the card drivers to only load the frontend modules | 19 | allow the card drivers to only load the frontend modules |
20 | they require. This saves several KBytes of memory. | 20 | they require. This saves several KBytes of memory. |
21 | 21 | ||
22 | Note: You will need moudule-init-tools v3.2 or later for this feature. | 22 | Note: You will need module-init-tools v3.2 or later for this feature. |
23 | 23 | ||
24 | If unsure say Y. | 24 | If unsure say Y. |
diff --git a/drivers/media/dvb/dvb-usb/dibusb-common.c b/drivers/media/dvb/dvb-usb/dibusb-common.c index fd3a9902f98d..5143e426d283 100644 --- a/drivers/media/dvb/dvb-usb/dibusb-common.c +++ b/drivers/media/dvb/dvb-usb/dibusb-common.c | |||
@@ -169,7 +169,7 @@ EXPORT_SYMBOL(dibusb_read_eeprom_byte); | |||
169 | // Config Adjacent channels Perf -cal22 | 169 | // Config Adjacent channels Perf -cal22 |
170 | static struct dibx000_agc_config dib3000p_mt2060_agc_config = { | 170 | static struct dibx000_agc_config dib3000p_mt2060_agc_config = { |
171 | .band_caps = BAND_VHF | BAND_UHF, | 171 | .band_caps = BAND_VHF | BAND_UHF, |
172 | .setup = (0 << 15) | (0 << 14) | (1 << 13) | (1 << 12) | (29 << 0), | 172 | .setup = (1 << 8) | (5 << 5) | (1 << 4) | (1 << 3) | (0 << 2) | (2 << 0), |
173 | 173 | ||
174 | .agc1_max = 48497, | 174 | .agc1_max = 48497, |
175 | .agc1_min = 23593, | 175 | .agc1_min = 23593, |
@@ -196,10 +196,14 @@ static struct dib3000mc_config stk3000p_dib3000p_config = { | |||
196 | .ln_adc_level = 0x1cc7, | 196 | .ln_adc_level = 0x1cc7, |
197 | 197 | ||
198 | .output_mpeg2_in_188_bytes = 1, | 198 | .output_mpeg2_in_188_bytes = 1, |
199 | |||
200 | .agc_command1 = 1, | ||
201 | .agc_command2 = 1, | ||
199 | }; | 202 | }; |
200 | 203 | ||
201 | static struct dibx000_agc_config dib3000p_panasonic_agc_config = { | 204 | static struct dibx000_agc_config dib3000p_panasonic_agc_config = { |
202 | .setup = (0 << 15) | (0 << 14) | (1 << 13) | (1 << 12) | (29 << 0), | 205 | .band_caps = BAND_VHF | BAND_UHF, |
206 | .setup = (1 << 8) | (5 << 5) | (1 << 4) | (1 << 3) | (0 << 2) | (2 << 0), | ||
203 | 207 | ||
204 | .agc1_max = 56361, | 208 | .agc1_max = 56361, |
205 | .agc1_min = 22282, | 209 | .agc1_min = 22282, |
@@ -226,6 +230,9 @@ static struct dib3000mc_config mod3000p_dib3000p_config = { | |||
226 | .ln_adc_level = 0x1cc7, | 230 | .ln_adc_level = 0x1cc7, |
227 | 231 | ||
228 | .output_mpeg2_in_188_bytes = 1, | 232 | .output_mpeg2_in_188_bytes = 1, |
233 | |||
234 | .agc_command1 = 1, | ||
235 | .agc_command2 = 1, | ||
229 | }; | 236 | }; |
230 | 237 | ||
231 | int dibusb_dib3000mc_frontend_attach(struct dvb_usb_adapter *adap) | 238 | int dibusb_dib3000mc_frontend_attach(struct dvb_usb_adapter *adap) |
diff --git a/drivers/media/dvb/dvb-usb/dibusb.h b/drivers/media/dvb/dvb-usb/dibusb.h index 5153fb943da1..b60781032742 100644 --- a/drivers/media/dvb/dvb-usb/dibusb.h +++ b/drivers/media/dvb/dvb-usb/dibusb.h | |||
@@ -99,7 +99,9 @@ | |||
99 | struct dibusb_state { | 99 | struct dibusb_state { |
100 | struct dib_fe_xfer_ops ops; | 100 | struct dib_fe_xfer_ops ops; |
101 | int mt2060_present; | 101 | int mt2060_present; |
102 | }; | ||
102 | 103 | ||
104 | struct dibusb_device_state { | ||
103 | /* for RC5 remote control */ | 105 | /* for RC5 remote control */ |
104 | int old_toggle; | 106 | int old_toggle; |
105 | int last_repeat_count; | 107 | int last_repeat_count; |
diff --git a/drivers/media/dvb/dvb-usb/nova-t-usb2.c b/drivers/media/dvb/dvb-usb/nova-t-usb2.c index a9219bf69b89..a58874c790b2 100644 --- a/drivers/media/dvb/dvb-usb/nova-t-usb2.c +++ b/drivers/media/dvb/dvb-usb/nova-t-usb2.c | |||
@@ -75,7 +75,7 @@ static int nova_t_rc_query(struct dvb_usb_device *d, u32 *event, int *state) | |||
75 | u8 key[5],cmd[2] = { DIBUSB_REQ_POLL_REMOTE, 0x35 }, data,toggle,custom; | 75 | u8 key[5],cmd[2] = { DIBUSB_REQ_POLL_REMOTE, 0x35 }, data,toggle,custom; |
76 | u16 raw; | 76 | u16 raw; |
77 | int i; | 77 | int i; |
78 | struct dibusb_state *st = d->priv; | 78 | struct dibusb_device_state *st = d->priv; |
79 | 79 | ||
80 | dvb_usb_generic_rw(d,cmd,2,key,5,0); | 80 | dvb_usb_generic_rw(d,cmd,2,key,5,0); |
81 | 81 | ||
@@ -184,6 +184,7 @@ static struct dvb_usb_device_properties nova_t_properties = { | |||
184 | .size_of_priv = sizeof(struct dibusb_state), | 184 | .size_of_priv = sizeof(struct dibusb_state), |
185 | } | 185 | } |
186 | }, | 186 | }, |
187 | .size_of_priv = sizeof(struct dibusb_device_state), | ||
187 | 188 | ||
188 | .power_ctrl = dibusb2_0_power_ctrl, | 189 | .power_ctrl = dibusb2_0_power_ctrl, |
189 | .read_mac_address = nova_t_read_mac_address, | 190 | .read_mac_address = nova_t_read_mac_address, |
diff --git a/drivers/media/dvb/frontends/dib3000mc.c b/drivers/media/dvb/frontends/dib3000mc.c index ccc813b525d6..3561a777568c 100644 --- a/drivers/media/dvb/frontends/dib3000mc.c +++ b/drivers/media/dvb/frontends/dib3000mc.c | |||
@@ -345,7 +345,7 @@ static int dib3000mc_init(struct dvb_frontend *demod) | |||
345 | 345 | ||
346 | /* agc */ | 346 | /* agc */ |
347 | dib3000mc_write_word(state, 36, state->cfg->max_time); | 347 | dib3000mc_write_word(state, 36, state->cfg->max_time); |
348 | dib3000mc_write_word(state, 37, agc->setup); | 348 | dib3000mc_write_word(state, 37, (state->cfg->agc_command1 << 13) | (state->cfg->agc_command2 << 12) | (0x1d << 0)); |
349 | dib3000mc_write_word(state, 38, state->cfg->pwm3_value); | 349 | dib3000mc_write_word(state, 38, state->cfg->pwm3_value); |
350 | dib3000mc_write_word(state, 39, state->cfg->ln_adc_level); | 350 | dib3000mc_write_word(state, 39, state->cfg->ln_adc_level); |
351 | 351 | ||
diff --git a/drivers/media/dvb/frontends/dib3000mc.h b/drivers/media/dvb/frontends/dib3000mc.h index b198cd5b1843..0d6fdef77538 100644 --- a/drivers/media/dvb/frontends/dib3000mc.h +++ b/drivers/media/dvb/frontends/dib3000mc.h | |||
@@ -28,6 +28,9 @@ struct dib3000mc_config { | |||
28 | u16 max_time; | 28 | u16 max_time; |
29 | u16 ln_adc_level; | 29 | u16 ln_adc_level; |
30 | 30 | ||
31 | u8 agc_command1 :1; | ||
32 | u8 agc_command2 :1; | ||
33 | |||
31 | u8 mobile_mode; | 34 | u8 mobile_mode; |
32 | 35 | ||
33 | u8 output_mpeg2_in_188_bytes; | 36 | u8 output_mpeg2_in_188_bytes; |
diff --git a/drivers/media/dvb/frontends/tda10086.h b/drivers/media/dvb/frontends/tda10086.h index e8061db11123..18457adee30b 100644 --- a/drivers/media/dvb/frontends/tda10086.h +++ b/drivers/media/dvb/frontends/tda10086.h | |||
@@ -35,7 +35,16 @@ struct tda10086_config | |||
35 | u8 invert; | 35 | u8 invert; |
36 | }; | 36 | }; |
37 | 37 | ||
38 | #if defined(CONFIG_DVB_TDA10086) || defined(CONFIG_DVB_TDA10086_MODULE) | ||
38 | extern struct dvb_frontend* tda10086_attach(const struct tda10086_config* config, | 39 | extern struct dvb_frontend* tda10086_attach(const struct tda10086_config* config, |
39 | struct i2c_adapter* i2c); | 40 | struct i2c_adapter* i2c); |
41 | #else | ||
42 | static inline struct dvb_frontend* tda10086_attach(const struct tda10086_config* config, | ||
43 | struct i2c_adapter* i2c) | ||
44 | { | ||
45 | printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __FUNCTION__); | ||
46 | return NULL; | ||
47 | } | ||
48 | #endif // CONFIG_DVB_TDA10086 | ||
40 | 49 | ||
41 | #endif // TDA10086_H | 50 | #endif // TDA10086_H |
diff --git a/drivers/media/dvb/frontends/tda826x.h b/drivers/media/dvb/frontends/tda826x.h index 3307607632b0..83998c001196 100644 --- a/drivers/media/dvb/frontends/tda826x.h +++ b/drivers/media/dvb/frontends/tda826x.h | |||
@@ -35,6 +35,19 @@ | |||
35 | * @param has_loopthrough Set to 1 if the card has a loopthrough RF connector. | 35 | * @param has_loopthrough Set to 1 if the card has a loopthrough RF connector. |
36 | * @return FE pointer on success, NULL on failure. | 36 | * @return FE pointer on success, NULL on failure. |
37 | */ | 37 | */ |
38 | extern struct dvb_frontend *tda826x_attach(struct dvb_frontend *fe, int addr, struct i2c_adapter *i2c, int has_loopthrough); | 38 | #if defined(CONFIG_DVB_TDA826X) || defined(CONFIG_DVB_TDA826X_MODULE) |
39 | 39 | extern struct dvb_frontend* tda826x_attach(struct dvb_frontend *fe, int addr, | |
40 | #endif | 40 | struct i2c_adapter *i2c, |
41 | int has_loopthrough); | ||
42 | #else | ||
43 | static inline struct dvb_frontend* tda826x_attach(struct dvb_frontend *fe, | ||
44 | int addr, | ||
45 | struct i2c_adapter *i2c, | ||
46 | int has_loopthrough) | ||
47 | { | ||
48 | printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __FUNCTION__); | ||
49 | return NULL; | ||
50 | } | ||
51 | #endif // CONFIG_DVB_TDA826X | ||
52 | |||
53 | #endif // __DVB_TDA826X_H__ | ||
diff --git a/drivers/media/video/Kconfig b/drivers/media/video/Kconfig index afb734df6e05..fbe5b6168cc2 100644 --- a/drivers/media/video/Kconfig +++ b/drivers/media/video/Kconfig | |||
@@ -677,6 +677,8 @@ config VIDEO_M32R_AR_M64278 | |||
677 | menu "V4L USB devices" | 677 | menu "V4L USB devices" |
678 | depends on USB && VIDEO_DEV | 678 | depends on USB && VIDEO_DEV |
679 | 679 | ||
680 | source "drivers/media/video/pvrusb2/Kconfig" | ||
681 | |||
680 | source "drivers/media/video/em28xx/Kconfig" | 682 | source "drivers/media/video/em28xx/Kconfig" |
681 | 683 | ||
682 | source "drivers/media/video/usbvideo/Kconfig" | 684 | source "drivers/media/video/usbvideo/Kconfig" |
diff --git a/drivers/media/video/cx25840/cx25840-vbi.c b/drivers/media/video/cx25840/cx25840-vbi.c index 48014a254e15..f85f2084324f 100644 --- a/drivers/media/video/cx25840/cx25840-vbi.c +++ b/drivers/media/video/cx25840/cx25840-vbi.c | |||
@@ -235,6 +235,7 @@ int cx25840_vbi(struct i2c_client *client, unsigned int cmd, void *arg) | |||
235 | 0, 0, V4L2_SLICED_VPS, 0, 0, /* 9 */ | 235 | 0, 0, V4L2_SLICED_VPS, 0, 0, /* 9 */ |
236 | 0, 0, 0, 0 | 236 | 0, 0, 0, 0 |
237 | }; | 237 | }; |
238 | int is_pal = !(cx25840_get_v4lstd(client) & V4L2_STD_525_60); | ||
238 | int i; | 239 | int i; |
239 | 240 | ||
240 | fmt = arg; | 241 | fmt = arg; |
@@ -246,13 +247,25 @@ int cx25840_vbi(struct i2c_client *client, unsigned int cmd, void *arg) | |||
246 | if ((cx25840_read(client, 0x404) & 0x10) == 0) | 247 | if ((cx25840_read(client, 0x404) & 0x10) == 0) |
247 | break; | 248 | break; |
248 | 249 | ||
249 | for (i = 7; i <= 23; i++) { | 250 | if (is_pal) { |
250 | u8 v = cx25840_read(client, 0x424 + i - 7); | 251 | for (i = 7; i <= 23; i++) { |
252 | u8 v = cx25840_read(client, 0x424 + i - 7); | ||
253 | |||
254 | svbi->service_lines[0][i] = lcr2vbi[v >> 4]; | ||
255 | svbi->service_lines[1][i] = lcr2vbi[v & 0xf]; | ||
256 | svbi->service_set |= | ||
257 | svbi->service_lines[0][i] | svbi->service_lines[1][i]; | ||
258 | } | ||
259 | } | ||
260 | else { | ||
261 | for (i = 10; i <= 21; i++) { | ||
262 | u8 v = cx25840_read(client, 0x424 + i - 10); | ||
251 | 263 | ||
252 | svbi->service_lines[0][i] = lcr2vbi[v >> 4]; | 264 | svbi->service_lines[0][i] = lcr2vbi[v >> 4]; |
253 | svbi->service_lines[1][i] = lcr2vbi[v & 0xf]; | 265 | svbi->service_lines[1][i] = lcr2vbi[v & 0xf]; |
254 | svbi->service_set |= | 266 | svbi->service_set |= |
255 | svbi->service_lines[0][i] | svbi->service_lines[1][i]; | 267 | svbi->service_lines[0][i] | svbi->service_lines[1][i]; |
268 | } | ||
256 | } | 269 | } |
257 | break; | 270 | break; |
258 | } | 271 | } |
diff --git a/drivers/media/video/cx88/cx88-cards.c b/drivers/media/video/cx88/cx88-cards.c index af71d4225c76..f764a57c56be 100644 --- a/drivers/media/video/cx88/cx88-cards.c +++ b/drivers/media/video/cx88/cx88-cards.c | |||
@@ -1230,6 +1230,7 @@ struct cx88_board cx88_boards[] = { | |||
1230 | .vmux = 2, | 1230 | .vmux = 2, |
1231 | .gpio0 = 0x84bf, | 1231 | .gpio0 = 0x84bf, |
1232 | }}, | 1232 | }}, |
1233 | .mpeg = CX88_MPEG_DVB, | ||
1233 | }, | 1234 | }, |
1234 | [CX88_BOARD_NORWOOD_MICRO] = { | 1235 | [CX88_BOARD_NORWOOD_MICRO] = { |
1235 | .name = "Norwood Micro TV Tuner", | 1236 | .name = "Norwood Micro TV Tuner", |
@@ -1590,6 +1591,18 @@ struct cx88_subid cx88_subids[] = { | |||
1590 | .subvendor = 0x0070, | 1591 | .subvendor = 0x0070, |
1591 | .subdevice = 0x9000, | 1592 | .subdevice = 0x9000, |
1592 | .card = CX88_BOARD_HAUPPAUGE_DVB_T1, | 1593 | .card = CX88_BOARD_HAUPPAUGE_DVB_T1, |
1594 | },{ | ||
1595 | .subvendor = 0x0070, | ||
1596 | .subdevice = 0x1400, | ||
1597 | .card = CX88_BOARD_HAUPPAUGE_HVR3000, | ||
1598 | },{ | ||
1599 | .subvendor = 0x0070, | ||
1600 | .subdevice = 0x1401, | ||
1601 | .card = CX88_BOARD_HAUPPAUGE_HVR3000, | ||
1602 | },{ | ||
1603 | .subvendor = 0x0070, | ||
1604 | .subdevice = 0x1402, | ||
1605 | .card = CX88_BOARD_HAUPPAUGE_HVR3000, | ||
1593 | }, | 1606 | }, |
1594 | }; | 1607 | }; |
1595 | const unsigned int cx88_idcount = ARRAY_SIZE(cx88_subids); | 1608 | const unsigned int cx88_idcount = ARRAY_SIZE(cx88_subids); |
@@ -1633,7 +1646,15 @@ static void hauppauge_eeprom(struct cx88_core *core, u8 *eeprom_data) | |||
1633 | /* Make sure we support the board model */ | 1646 | /* Make sure we support the board model */ |
1634 | switch (tv.model) | 1647 | switch (tv.model) |
1635 | { | 1648 | { |
1649 | case 14009: /* WinTV-HVR3000 (Retail, IR, b/panel video, 3.5mm audio in) */ | ||
1650 | case 14019: /* WinTV-HVR3000 (Retail, IR Blaster, b/panel video, 3.5mm audio in) */ | ||
1651 | case 14029: /* WinTV-HVR3000 (Retail, IR, b/panel video, 3.5mm audio in - 880 bridge) */ | ||
1652 | case 14109: /* WinTV-HVR3000 (Retail, IR, b/panel video, 3.5mm audio in - low profile) */ | ||
1653 | case 14129: /* WinTV-HVR3000 (Retail, IR, b/panel video, 3.5mm audio in - 880 bridge - LP) */ | ||
1654 | case 14559: /* WinTV-HVR3000 (OEM, no IR, b/panel video, 3.5mm audio in) */ | ||
1636 | case 14569: /* WinTV-HVR3000 (OEM, no IR, no back panel video) */ | 1655 | case 14569: /* WinTV-HVR3000 (OEM, no IR, no back panel video) */ |
1656 | case 14659: /* WinTV-HVR3000 (OEM, no IR, b/panel video, RCA audio in - Low profile) */ | ||
1657 | case 14669: /* WinTV-HVR3000 (OEM, no IR, no b/panel video - Low profile) */ | ||
1637 | case 28552: /* WinTV-PVR 'Roslyn' (No IR) */ | 1658 | case 28552: /* WinTV-PVR 'Roslyn' (No IR) */ |
1638 | case 34519: /* WinTV-PCI-FM */ | 1659 | case 34519: /* WinTV-PCI-FM */ |
1639 | case 90002: /* Nova-T-PCI (9002) */ | 1660 | case 90002: /* Nova-T-PCI (9002) */ |
diff --git a/drivers/media/video/cx88/cx88-dvb.c b/drivers/media/video/cx88/cx88-dvb.c index bd0c8797f26d..0ef13e7efa2e 100644 --- a/drivers/media/video/cx88/cx88-dvb.c +++ b/drivers/media/video/cx88/cx88-dvb.c | |||
@@ -315,15 +315,22 @@ static struct cx22702_config hauppauge_novat_config = { | |||
315 | .demod_address = 0x43, | 315 | .demod_address = 0x43, |
316 | .output_mode = CX22702_SERIAL_OUTPUT, | 316 | .output_mode = CX22702_SERIAL_OUTPUT, |
317 | }; | 317 | }; |
318 | |||
318 | static struct cx22702_config hauppauge_hvr1100_config = { | 319 | static struct cx22702_config hauppauge_hvr1100_config = { |
319 | .demod_address = 0x63, | 320 | .demod_address = 0x63, |
320 | .output_mode = CX22702_SERIAL_OUTPUT, | 321 | .output_mode = CX22702_SERIAL_OUTPUT, |
321 | }; | 322 | }; |
323 | |||
322 | static struct cx22702_config hauppauge_hvr1300_config = { | 324 | static struct cx22702_config hauppauge_hvr1300_config = { |
323 | .demod_address = 0x63, | 325 | .demod_address = 0x63, |
324 | .output_mode = CX22702_SERIAL_OUTPUT, | 326 | .output_mode = CX22702_SERIAL_OUTPUT, |
325 | }; | 327 | }; |
326 | 328 | ||
329 | static struct cx22702_config hauppauge_hvr3000_config = { | ||
330 | .demod_address = 0x63, | ||
331 | .output_mode = CX22702_SERIAL_OUTPUT, | ||
332 | }; | ||
333 | |||
327 | static int or51132_set_ts_param(struct dvb_frontend* fe, | 334 | static int or51132_set_ts_param(struct dvb_frontend* fe, |
328 | int is_punctured) | 335 | int is_punctured) |
329 | { | 336 | { |
@@ -558,6 +565,16 @@ static int dvb_register(struct cx8802_dev *dev) | |||
558 | &dvb_pll_fmd1216me); | 565 | &dvb_pll_fmd1216me); |
559 | } | 566 | } |
560 | break; | 567 | break; |
568 | case CX88_BOARD_HAUPPAUGE_HVR3000: | ||
569 | dev->dvb.frontend = dvb_attach(cx22702_attach, | ||
570 | &hauppauge_hvr3000_config, | ||
571 | &dev->core->i2c_adap); | ||
572 | if (dev->dvb.frontend != NULL) { | ||
573 | dvb_attach(dvb_pll_attach, dev->dvb.frontend, 0x61, | ||
574 | &dev->core->i2c_adap, | ||
575 | &dvb_pll_fmd1216me); | ||
576 | } | ||
577 | break; | ||
561 | case CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_PLUS: | 578 | case CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_PLUS: |
562 | dev->dvb.frontend = dvb_attach(mt352_attach, | 579 | dev->dvb.frontend = dvb_attach(mt352_attach, |
563 | &dvico_fusionhdtv, | 580 | &dvico_fusionhdtv, |
diff --git a/drivers/media/video/cx88/cx88-input.c b/drivers/media/video/cx88/cx88-input.c index 83ebf7a3c054..ee48995a4ab5 100644 --- a/drivers/media/video/cx88/cx88-input.c +++ b/drivers/media/video/cx88/cx88-input.c | |||
@@ -196,6 +196,7 @@ int cx88_ir_init(struct cx88_core *core, struct pci_dev *pci) | |||
196 | case CX88_BOARD_HAUPPAUGE_NOVASPLUS_S1: | 196 | case CX88_BOARD_HAUPPAUGE_NOVASPLUS_S1: |
197 | case CX88_BOARD_HAUPPAUGE_HVR1100: | 197 | case CX88_BOARD_HAUPPAUGE_HVR1100: |
198 | case CX88_BOARD_HAUPPAUGE_HVR1300: | 198 | case CX88_BOARD_HAUPPAUGE_HVR1300: |
199 | case CX88_BOARD_HAUPPAUGE_HVR3000: | ||
199 | ir_codes = ir_codes_hauppauge_new; | 200 | ir_codes = ir_codes_hauppauge_new; |
200 | ir_type = IR_TYPE_RC5; | 201 | ir_type = IR_TYPE_RC5; |
201 | ir->sampling = 1; | 202 | ir->sampling = 1; |
@@ -419,6 +420,7 @@ void cx88_ir_irq(struct cx88_core *core) | |||
419 | case CX88_BOARD_HAUPPAUGE_NOVASPLUS_S1: | 420 | case CX88_BOARD_HAUPPAUGE_NOVASPLUS_S1: |
420 | case CX88_BOARD_HAUPPAUGE_HVR1100: | 421 | case CX88_BOARD_HAUPPAUGE_HVR1100: |
421 | case CX88_BOARD_HAUPPAUGE_HVR1300: | 422 | case CX88_BOARD_HAUPPAUGE_HVR1300: |
423 | case CX88_BOARD_HAUPPAUGE_HVR3000: | ||
422 | ircode = ir_decode_biphase(ir->samples, ir->scount, 5, 7); | 424 | ircode = ir_decode_biphase(ir->samples, ir->scount, 5, 7); |
423 | ir_dprintk("biphase decoded: %x\n", ircode); | 425 | ir_dprintk("biphase decoded: %x\n", ircode); |
424 | if ((ircode & 0xfffff000) != 0x3000) | 426 | if ((ircode & 0xfffff000) != 0x3000) |
diff --git a/drivers/media/video/et61x251/et61x251_core.c b/drivers/media/video/et61x251/et61x251_core.c index bc544cc7ccb8..f786ab11d2cd 100644 --- a/drivers/media/video/et61x251/et61x251_core.c +++ b/drivers/media/video/et61x251/et61x251_core.c | |||
@@ -973,16 +973,32 @@ static CLASS_DEVICE_ATTR(i2c_val, S_IRUGO | S_IWUSR, | |||
973 | et61x251_show_i2c_val, et61x251_store_i2c_val); | 973 | et61x251_show_i2c_val, et61x251_store_i2c_val); |
974 | 974 | ||
975 | 975 | ||
976 | static void et61x251_create_sysfs(struct et61x251_device* cam) | 976 | static int et61x251_create_sysfs(struct et61x251_device* cam) |
977 | { | 977 | { |
978 | struct video_device *v4ldev = cam->v4ldev; | 978 | struct video_device *v4ldev = cam->v4ldev; |
979 | int rc; | ||
979 | 980 | ||
980 | video_device_create_file(v4ldev, &class_device_attr_reg); | 981 | rc = video_device_create_file(v4ldev, &class_device_attr_reg); |
981 | video_device_create_file(v4ldev, &class_device_attr_val); | 982 | if (rc) goto err; |
983 | rc = video_device_create_file(v4ldev, &class_device_attr_val); | ||
984 | if (rc) goto err_reg; | ||
982 | if (cam->sensor.sysfs_ops) { | 985 | if (cam->sensor.sysfs_ops) { |
983 | video_device_create_file(v4ldev, &class_device_attr_i2c_reg); | 986 | rc = video_device_create_file(v4ldev, &class_device_attr_i2c_reg); |
984 | video_device_create_file(v4ldev, &class_device_attr_i2c_val); | 987 | if (rc) goto err_val; |
988 | rc = video_device_create_file(v4ldev, &class_device_attr_i2c_val); | ||
989 | if (rc) goto err_i2c_reg; | ||
985 | } | 990 | } |
991 | |||
992 | return 0; | ||
993 | |||
994 | err_i2c_reg: | ||
995 | video_device_remove_file(v4ldev, &class_device_attr_i2c_reg); | ||
996 | err_val: | ||
997 | video_device_remove_file(v4ldev, &class_device_attr_val); | ||
998 | err_reg: | ||
999 | video_device_remove_file(v4ldev, &class_device_attr_reg); | ||
1000 | err: | ||
1001 | return rc; | ||
986 | } | 1002 | } |
987 | #endif /* CONFIG_VIDEO_ADV_DEBUG */ | 1003 | #endif /* CONFIG_VIDEO_ADV_DEBUG */ |
988 | 1004 | ||
@@ -2534,7 +2550,9 @@ et61x251_usb_probe(struct usb_interface* intf, const struct usb_device_id* id) | |||
2534 | dev_nr = (dev_nr < ET61X251_MAX_DEVICES-1) ? dev_nr+1 : 0; | 2550 | dev_nr = (dev_nr < ET61X251_MAX_DEVICES-1) ? dev_nr+1 : 0; |
2535 | 2551 | ||
2536 | #ifdef CONFIG_VIDEO_ADV_DEBUG | 2552 | #ifdef CONFIG_VIDEO_ADV_DEBUG |
2537 | et61x251_create_sysfs(cam); | 2553 | err = et61x251_create_sysfs(cam); |
2554 | if (err) | ||
2555 | goto fail2; | ||
2538 | DBG(2, "Optional device control through 'sysfs' interface ready"); | 2556 | DBG(2, "Optional device control through 'sysfs' interface ready"); |
2539 | #endif | 2557 | #endif |
2540 | 2558 | ||
@@ -2544,6 +2562,13 @@ et61x251_usb_probe(struct usb_interface* intf, const struct usb_device_id* id) | |||
2544 | 2562 | ||
2545 | return 0; | 2563 | return 0; |
2546 | 2564 | ||
2565 | #ifdef CONFIG_VIDEO_ADV_DEBUG | ||
2566 | fail2: | ||
2567 | video_nr[dev_nr] = -1; | ||
2568 | dev_nr = (dev_nr < ET61X251_MAX_DEVICES-1) ? dev_nr+1 : 0; | ||
2569 | mutex_unlock(&cam->dev_mutex); | ||
2570 | video_unregister_device(cam->v4ldev); | ||
2571 | #endif | ||
2547 | fail: | 2572 | fail: |
2548 | if (cam) { | 2573 | if (cam) { |
2549 | kfree(cam->control_buffer); | 2574 | kfree(cam->control_buffer); |
diff --git a/drivers/media/video/ov511.c b/drivers/media/video/ov511.c index ce4886f1528d..b4db2cbb5a84 100644 --- a/drivers/media/video/ov511.c +++ b/drivers/media/video/ov511.c | |||
@@ -5648,17 +5648,49 @@ static ssize_t show_exposure(struct class_device *cd, char *buf) | |||
5648 | } | 5648 | } |
5649 | static CLASS_DEVICE_ATTR(exposure, S_IRUGO, show_exposure, NULL); | 5649 | static CLASS_DEVICE_ATTR(exposure, S_IRUGO, show_exposure, NULL); |
5650 | 5650 | ||
5651 | static void ov_create_sysfs(struct video_device *vdev) | 5651 | static int ov_create_sysfs(struct video_device *vdev) |
5652 | { | 5652 | { |
5653 | video_device_create_file(vdev, &class_device_attr_custom_id); | 5653 | int rc; |
5654 | video_device_create_file(vdev, &class_device_attr_model); | 5654 | |
5655 | video_device_create_file(vdev, &class_device_attr_bridge); | 5655 | rc = video_device_create_file(vdev, &class_device_attr_custom_id); |
5656 | video_device_create_file(vdev, &class_device_attr_sensor); | 5656 | if (rc) goto err; |
5657 | video_device_create_file(vdev, &class_device_attr_brightness); | 5657 | rc = video_device_create_file(vdev, &class_device_attr_model); |
5658 | video_device_create_file(vdev, &class_device_attr_saturation); | 5658 | if (rc) goto err_id; |
5659 | video_device_create_file(vdev, &class_device_attr_contrast); | 5659 | rc = video_device_create_file(vdev, &class_device_attr_bridge); |
5660 | video_device_create_file(vdev, &class_device_attr_hue); | 5660 | if (rc) goto err_model; |
5661 | video_device_create_file(vdev, &class_device_attr_exposure); | 5661 | rc = video_device_create_file(vdev, &class_device_attr_sensor); |
5662 | if (rc) goto err_bridge; | ||
5663 | rc = video_device_create_file(vdev, &class_device_attr_brightness); | ||
5664 | if (rc) goto err_sensor; | ||
5665 | rc = video_device_create_file(vdev, &class_device_attr_saturation); | ||
5666 | if (rc) goto err_bright; | ||
5667 | rc = video_device_create_file(vdev, &class_device_attr_contrast); | ||
5668 | if (rc) goto err_sat; | ||
5669 | rc = video_device_create_file(vdev, &class_device_attr_hue); | ||
5670 | if (rc) goto err_contrast; | ||
5671 | rc = video_device_create_file(vdev, &class_device_attr_exposure); | ||
5672 | if (rc) goto err_hue; | ||
5673 | |||
5674 | return 0; | ||
5675 | |||
5676 | err_hue: | ||
5677 | video_device_remove_file(vdev, &class_device_attr_hue); | ||
5678 | err_contrast: | ||
5679 | video_device_remove_file(vdev, &class_device_attr_contrast); | ||
5680 | err_sat: | ||
5681 | video_device_remove_file(vdev, &class_device_attr_saturation); | ||
5682 | err_bright: | ||
5683 | video_device_remove_file(vdev, &class_device_attr_brightness); | ||
5684 | err_sensor: | ||
5685 | video_device_remove_file(vdev, &class_device_attr_sensor); | ||
5686 | err_bridge: | ||
5687 | video_device_remove_file(vdev, &class_device_attr_bridge); | ||
5688 | err_model: | ||
5689 | video_device_remove_file(vdev, &class_device_attr_model); | ||
5690 | err_id: | ||
5691 | video_device_remove_file(vdev, &class_device_attr_custom_id); | ||
5692 | err: | ||
5693 | return rc; | ||
5662 | } | 5694 | } |
5663 | 5695 | ||
5664 | /**************************************************************************** | 5696 | /**************************************************************************** |
@@ -5817,7 +5849,11 @@ ov51x_probe(struct usb_interface *intf, const struct usb_device_id *id) | |||
5817 | ov->vdev->minor); | 5849 | ov->vdev->minor); |
5818 | 5850 | ||
5819 | usb_set_intfdata(intf, ov); | 5851 | usb_set_intfdata(intf, ov); |
5820 | ov_create_sysfs(ov->vdev); | 5852 | if (ov_create_sysfs(ov->vdev)) { |
5853 | err("ov_create_sysfs failed"); | ||
5854 | goto error; | ||
5855 | } | ||
5856 | |||
5821 | return 0; | 5857 | return 0; |
5822 | 5858 | ||
5823 | error: | 5859 | error: |
diff --git a/drivers/media/video/pwc/pwc-if.c b/drivers/media/video/pwc/pwc-if.c index c77b85cf3d80..46c114830884 100644 --- a/drivers/media/video/pwc/pwc-if.c +++ b/drivers/media/video/pwc/pwc-if.c | |||
@@ -1024,12 +1024,25 @@ static ssize_t show_snapshot_button_status(struct class_device *class_dev, char | |||
1024 | static CLASS_DEVICE_ATTR(button, S_IRUGO | S_IWUSR, show_snapshot_button_status, | 1024 | static CLASS_DEVICE_ATTR(button, S_IRUGO | S_IWUSR, show_snapshot_button_status, |
1025 | NULL); | 1025 | NULL); |
1026 | 1026 | ||
1027 | static void pwc_create_sysfs_files(struct video_device *vdev) | 1027 | static int pwc_create_sysfs_files(struct video_device *vdev) |
1028 | { | 1028 | { |
1029 | struct pwc_device *pdev = video_get_drvdata(vdev); | 1029 | struct pwc_device *pdev = video_get_drvdata(vdev); |
1030 | if (pdev->features & FEATURE_MOTOR_PANTILT) | 1030 | int rc; |
1031 | video_device_create_file(vdev, &class_device_attr_pan_tilt); | 1031 | |
1032 | video_device_create_file(vdev, &class_device_attr_button); | 1032 | rc = video_device_create_file(vdev, &class_device_attr_button); |
1033 | if (rc) | ||
1034 | goto err; | ||
1035 | if (pdev->features & FEATURE_MOTOR_PANTILT) { | ||
1036 | rc = video_device_create_file(vdev,&class_device_attr_pan_tilt); | ||
1037 | if (rc) goto err_button; | ||
1038 | } | ||
1039 | |||
1040 | return 0; | ||
1041 | |||
1042 | err_button: | ||
1043 | video_device_remove_file(vdev, &class_device_attr_button); | ||
1044 | err: | ||
1045 | return rc; | ||
1033 | } | 1046 | } |
1034 | 1047 | ||
1035 | static void pwc_remove_sysfs_files(struct video_device *vdev) | 1048 | static void pwc_remove_sysfs_files(struct video_device *vdev) |
@@ -1408,7 +1421,7 @@ static int usb_pwc_probe(struct usb_interface *intf, const struct usb_device_id | |||
1408 | struct usb_device *udev = interface_to_usbdev(intf); | 1421 | struct usb_device *udev = interface_to_usbdev(intf); |
1409 | struct pwc_device *pdev = NULL; | 1422 | struct pwc_device *pdev = NULL; |
1410 | int vendor_id, product_id, type_id; | 1423 | int vendor_id, product_id, type_id; |
1411 | int i, hint; | 1424 | int i, hint, rc; |
1412 | int features = 0; | 1425 | int features = 0; |
1413 | int video_nr = -1; /* default: use next available device */ | 1426 | int video_nr = -1; /* default: use next available device */ |
1414 | char serial_number[30], *name; | 1427 | char serial_number[30], *name; |
@@ -1709,9 +1722,8 @@ static int usb_pwc_probe(struct usb_interface *intf, const struct usb_device_id | |||
1709 | i = video_register_device(pdev->vdev, VFL_TYPE_GRABBER, video_nr); | 1722 | i = video_register_device(pdev->vdev, VFL_TYPE_GRABBER, video_nr); |
1710 | if (i < 0) { | 1723 | if (i < 0) { |
1711 | PWC_ERROR("Failed to register as video device (%d).\n", i); | 1724 | PWC_ERROR("Failed to register as video device (%d).\n", i); |
1712 | video_device_release(pdev->vdev); /* Drip... drip... drip... */ | 1725 | rc = i; |
1713 | kfree(pdev); /* Oops, no memory leaks please */ | 1726 | goto err; |
1714 | return -EIO; | ||
1715 | } | 1727 | } |
1716 | else { | 1728 | else { |
1717 | PWC_INFO("Registered as /dev/video%d.\n", pdev->vdev->minor & 0x3F); | 1729 | PWC_INFO("Registered as /dev/video%d.\n", pdev->vdev->minor & 0x3F); |
@@ -1723,13 +1735,24 @@ static int usb_pwc_probe(struct usb_interface *intf, const struct usb_device_id | |||
1723 | 1735 | ||
1724 | PWC_DEBUG_PROBE("probe() function returning struct at 0x%p.\n", pdev); | 1736 | PWC_DEBUG_PROBE("probe() function returning struct at 0x%p.\n", pdev); |
1725 | usb_set_intfdata (intf, pdev); | 1737 | usb_set_intfdata (intf, pdev); |
1726 | pwc_create_sysfs_files(pdev->vdev); | 1738 | rc = pwc_create_sysfs_files(pdev->vdev); |
1739 | if (rc) | ||
1740 | goto err_unreg; | ||
1727 | 1741 | ||
1728 | /* Set the leds off */ | 1742 | /* Set the leds off */ |
1729 | pwc_set_leds(pdev, 0, 0); | 1743 | pwc_set_leds(pdev, 0, 0); |
1730 | pwc_camera_power(pdev, 0); | 1744 | pwc_camera_power(pdev, 0); |
1731 | 1745 | ||
1732 | return 0; | 1746 | return 0; |
1747 | |||
1748 | err_unreg: | ||
1749 | if (hint < MAX_DEV_HINTS) | ||
1750 | device_hint[hint].pdev = NULL; | ||
1751 | video_unregister_device(pdev->vdev); | ||
1752 | err: | ||
1753 | video_device_release(pdev->vdev); /* Drip... drip... drip... */ | ||
1754 | kfree(pdev); /* Oops, no memory leaks please */ | ||
1755 | return rc; | ||
1733 | } | 1756 | } |
1734 | 1757 | ||
1735 | /* The user janked out the cable... */ | 1758 | /* The user janked out the cable... */ |
diff --git a/drivers/media/video/saa7115.c b/drivers/media/video/saa7115.c index 974179d4d389..c5719f7bd1ac 100644 --- a/drivers/media/video/saa7115.c +++ b/drivers/media/video/saa7115.c | |||
@@ -960,6 +960,8 @@ static void saa711x_set_v4lstd(struct i2c_client *client, v4l2_std_id std) | |||
960 | reg |= 0x10; | 960 | reg |= 0x10; |
961 | } else if (std == V4L2_STD_NTSC_M_JP) { | 961 | } else if (std == V4L2_STD_NTSC_M_JP) { |
962 | reg |= 0x40; | 962 | reg |= 0x40; |
963 | } else if (std == V4L2_STD_SECAM) { | ||
964 | reg |= 0x50; | ||
963 | } | 965 | } |
964 | saa711x_write(client, R_0E_CHROMA_CNTL_1, reg); | 966 | saa711x_write(client, R_0E_CHROMA_CNTL_1, reg); |
965 | } else { | 967 | } else { |
diff --git a/drivers/media/video/saa7134/saa7134-video.c b/drivers/media/video/saa7134/saa7134-video.c index 203302f21827..830617ea81cc 100644 --- a/drivers/media/video/saa7134/saa7134-video.c +++ b/drivers/media/video/saa7134/saa7134-video.c | |||
@@ -2248,7 +2248,11 @@ static int radio_do_ioctl(struct inode *inode, struct file *file, | |||
2248 | t->type = V4L2_TUNER_RADIO; | 2248 | t->type = V4L2_TUNER_RADIO; |
2249 | 2249 | ||
2250 | saa7134_i2c_call_clients(dev, VIDIOC_G_TUNER, t); | 2250 | saa7134_i2c_call_clients(dev, VIDIOC_G_TUNER, t); |
2251 | 2251 | if (dev->input->amux == TV) { | |
2252 | t->signal = 0xf800 - ((saa_readb(0x581) & 0x1f) << 11); | ||
2253 | t->rxsubchans = (saa_readb(0x529) & 0x08) ? | ||
2254 | V4L2_TUNER_SUB_STEREO : V4L2_TUNER_SUB_MONO; | ||
2255 | } | ||
2252 | return 0; | 2256 | return 0; |
2253 | } | 2257 | } |
2254 | case VIDIOC_S_TUNER: | 2258 | case VIDIOC_S_TUNER: |
diff --git a/drivers/media/video/sn9c102/sn9c102_core.c b/drivers/media/video/sn9c102/sn9c102_core.c index 3e0ff8a78468..a4702d3c2aca 100644 --- a/drivers/media/video/sn9c102/sn9c102_core.c +++ b/drivers/media/video/sn9c102/sn9c102_core.c | |||
@@ -1240,23 +1240,53 @@ static CLASS_DEVICE_ATTR(frame_header, S_IRUGO, | |||
1240 | sn9c102_show_frame_header, NULL); | 1240 | sn9c102_show_frame_header, NULL); |
1241 | 1241 | ||
1242 | 1242 | ||
1243 | static void sn9c102_create_sysfs(struct sn9c102_device* cam) | 1243 | static int sn9c102_create_sysfs(struct sn9c102_device* cam) |
1244 | { | 1244 | { |
1245 | struct video_device *v4ldev = cam->v4ldev; | 1245 | struct video_device *v4ldev = cam->v4ldev; |
1246 | int rc; | ||
1247 | |||
1248 | rc = video_device_create_file(v4ldev, &class_device_attr_reg); | ||
1249 | if (rc) goto err; | ||
1250 | rc = video_device_create_file(v4ldev, &class_device_attr_val); | ||
1251 | if (rc) goto err_reg; | ||
1252 | rc = video_device_create_file(v4ldev, &class_device_attr_frame_header); | ||
1253 | if (rc) goto err_val; | ||
1246 | 1254 | ||
1247 | video_device_create_file(v4ldev, &class_device_attr_reg); | ||
1248 | video_device_create_file(v4ldev, &class_device_attr_val); | ||
1249 | video_device_create_file(v4ldev, &class_device_attr_frame_header); | ||
1250 | if (cam->bridge == BRIDGE_SN9C101 || cam->bridge == BRIDGE_SN9C102) | ||
1251 | video_device_create_file(v4ldev, &class_device_attr_green); | ||
1252 | else if (cam->bridge == BRIDGE_SN9C103) { | ||
1253 | video_device_create_file(v4ldev, &class_device_attr_blue); | ||
1254 | video_device_create_file(v4ldev, &class_device_attr_red); | ||
1255 | } | ||
1256 | if (cam->sensor.sysfs_ops) { | 1255 | if (cam->sensor.sysfs_ops) { |
1257 | video_device_create_file(v4ldev, &class_device_attr_i2c_reg); | 1256 | rc = video_device_create_file(v4ldev, &class_device_attr_i2c_reg); |
1258 | video_device_create_file(v4ldev, &class_device_attr_i2c_val); | 1257 | if (rc) goto err_frhead; |
1258 | rc = video_device_create_file(v4ldev, &class_device_attr_i2c_val); | ||
1259 | if (rc) goto err_i2c_reg; | ||
1260 | } | ||
1261 | |||
1262 | if (cam->bridge == BRIDGE_SN9C101 || cam->bridge == BRIDGE_SN9C102) { | ||
1263 | rc = video_device_create_file(v4ldev, &class_device_attr_green); | ||
1264 | if (rc) goto err_i2c_val; | ||
1265 | } else if (cam->bridge == BRIDGE_SN9C103) { | ||
1266 | rc = video_device_create_file(v4ldev, &class_device_attr_blue); | ||
1267 | if (rc) goto err_i2c_val; | ||
1268 | rc = video_device_create_file(v4ldev, &class_device_attr_red); | ||
1269 | if (rc) goto err_blue; | ||
1259 | } | 1270 | } |
1271 | |||
1272 | return 0; | ||
1273 | |||
1274 | err_blue: | ||
1275 | video_device_remove_file(v4ldev, &class_device_attr_blue); | ||
1276 | err_i2c_val: | ||
1277 | if (cam->sensor.sysfs_ops) | ||
1278 | video_device_remove_file(v4ldev, &class_device_attr_i2c_val); | ||
1279 | err_i2c_reg: | ||
1280 | if (cam->sensor.sysfs_ops) | ||
1281 | video_device_remove_file(v4ldev, &class_device_attr_i2c_reg); | ||
1282 | err_frhead: | ||
1283 | video_device_remove_file(v4ldev, &class_device_attr_frame_header); | ||
1284 | err_val: | ||
1285 | video_device_remove_file(v4ldev, &class_device_attr_val); | ||
1286 | err_reg: | ||
1287 | video_device_remove_file(v4ldev, &class_device_attr_reg); | ||
1288 | err: | ||
1289 | return rc; | ||
1260 | } | 1290 | } |
1261 | #endif /* CONFIG_VIDEO_ADV_DEBUG */ | 1291 | #endif /* CONFIG_VIDEO_ADV_DEBUG */ |
1262 | 1292 | ||
@@ -2809,10 +2839,7 @@ sn9c102_usb_probe(struct usb_interface* intf, const struct usb_device_id* id) | |||
2809 | DBG(1, "V4L2 device registration failed"); | 2839 | DBG(1, "V4L2 device registration failed"); |
2810 | if (err == -ENFILE && video_nr[dev_nr] == -1) | 2840 | if (err == -ENFILE && video_nr[dev_nr] == -1) |
2811 | DBG(1, "Free /dev/videoX node not found"); | 2841 | DBG(1, "Free /dev/videoX node not found"); |
2812 | video_nr[dev_nr] = -1; | 2842 | goto fail2; |
2813 | dev_nr = (dev_nr < SN9C102_MAX_DEVICES-1) ? dev_nr+1 : 0; | ||
2814 | mutex_unlock(&cam->dev_mutex); | ||
2815 | goto fail; | ||
2816 | } | 2843 | } |
2817 | 2844 | ||
2818 | DBG(2, "V4L2 device registered as /dev/video%d", cam->v4ldev->minor); | 2845 | DBG(2, "V4L2 device registered as /dev/video%d", cam->v4ldev->minor); |
@@ -2823,7 +2850,9 @@ sn9c102_usb_probe(struct usb_interface* intf, const struct usb_device_id* id) | |||
2823 | dev_nr = (dev_nr < SN9C102_MAX_DEVICES-1) ? dev_nr+1 : 0; | 2850 | dev_nr = (dev_nr < SN9C102_MAX_DEVICES-1) ? dev_nr+1 : 0; |
2824 | 2851 | ||
2825 | #ifdef CONFIG_VIDEO_ADV_DEBUG | 2852 | #ifdef CONFIG_VIDEO_ADV_DEBUG |
2826 | sn9c102_create_sysfs(cam); | 2853 | err = sn9c102_create_sysfs(cam); |
2854 | if (err) | ||
2855 | goto fail3; | ||
2827 | DBG(2, "Optional device control through 'sysfs' interface ready"); | 2856 | DBG(2, "Optional device control through 'sysfs' interface ready"); |
2828 | #endif | 2857 | #endif |
2829 | 2858 | ||
@@ -2833,6 +2862,14 @@ sn9c102_usb_probe(struct usb_interface* intf, const struct usb_device_id* id) | |||
2833 | 2862 | ||
2834 | return 0; | 2863 | return 0; |
2835 | 2864 | ||
2865 | #ifdef CONFIG_VIDEO_ADV_DEBUG | ||
2866 | fail3: | ||
2867 | video_unregister_device(cam->v4ldev); | ||
2868 | #endif | ||
2869 | fail2: | ||
2870 | video_nr[dev_nr] = -1; | ||
2871 | dev_nr = (dev_nr < SN9C102_MAX_DEVICES-1) ? dev_nr+1 : 0; | ||
2872 | mutex_unlock(&cam->dev_mutex); | ||
2836 | fail: | 2873 | fail: |
2837 | if (cam) { | 2874 | if (cam) { |
2838 | kfree(cam->control_buffer); | 2875 | kfree(cam->control_buffer); |
diff --git a/drivers/media/video/stv680.c b/drivers/media/video/stv680.c index 87e11300181d..6d1ef1e2e8ef 100644 --- a/drivers/media/video/stv680.c +++ b/drivers/media/video/stv680.c | |||
@@ -516,16 +516,45 @@ stv680_file(frames_read, framecount, "%d\n"); | |||
516 | stv680_file(packets_dropped, dropped, "%d\n"); | 516 | stv680_file(packets_dropped, dropped, "%d\n"); |
517 | stv680_file(decoding_errors, error, "%d\n"); | 517 | stv680_file(decoding_errors, error, "%d\n"); |
518 | 518 | ||
519 | static void stv680_create_sysfs_files(struct video_device *vdev) | 519 | static int stv680_create_sysfs_files(struct video_device *vdev) |
520 | { | 520 | { |
521 | video_device_create_file(vdev, &class_device_attr_model); | 521 | int rc; |
522 | video_device_create_file(vdev, &class_device_attr_in_use); | 522 | |
523 | video_device_create_file(vdev, &class_device_attr_streaming); | 523 | rc = video_device_create_file(vdev, &class_device_attr_model); |
524 | video_device_create_file(vdev, &class_device_attr_palette); | 524 | if (rc) goto err; |
525 | video_device_create_file(vdev, &class_device_attr_frames_total); | 525 | rc = video_device_create_file(vdev, &class_device_attr_in_use); |
526 | video_device_create_file(vdev, &class_device_attr_frames_read); | 526 | if (rc) goto err_model; |
527 | video_device_create_file(vdev, &class_device_attr_packets_dropped); | 527 | rc = video_device_create_file(vdev, &class_device_attr_streaming); |
528 | video_device_create_file(vdev, &class_device_attr_decoding_errors); | 528 | if (rc) goto err_inuse; |
529 | rc = video_device_create_file(vdev, &class_device_attr_palette); | ||
530 | if (rc) goto err_stream; | ||
531 | rc = video_device_create_file(vdev, &class_device_attr_frames_total); | ||
532 | if (rc) goto err_pal; | ||
533 | rc = video_device_create_file(vdev, &class_device_attr_frames_read); | ||
534 | if (rc) goto err_framtot; | ||
535 | rc = video_device_create_file(vdev, &class_device_attr_packets_dropped); | ||
536 | if (rc) goto err_framread; | ||
537 | rc = video_device_create_file(vdev, &class_device_attr_decoding_errors); | ||
538 | if (rc) goto err_dropped; | ||
539 | |||
540 | return 0; | ||
541 | |||
542 | err_dropped: | ||
543 | video_device_remove_file(vdev, &class_device_attr_packets_dropped); | ||
544 | err_framread: | ||
545 | video_device_remove_file(vdev, &class_device_attr_frames_read); | ||
546 | err_framtot: | ||
547 | video_device_remove_file(vdev, &class_device_attr_frames_total); | ||
548 | err_pal: | ||
549 | video_device_remove_file(vdev, &class_device_attr_palette); | ||
550 | err_stream: | ||
551 | video_device_remove_file(vdev, &class_device_attr_streaming); | ||
552 | err_inuse: | ||
553 | video_device_remove_file(vdev, &class_device_attr_in_use); | ||
554 | err_model: | ||
555 | video_device_remove_file(vdev, &class_device_attr_model); | ||
556 | err: | ||
557 | return rc; | ||
529 | } | 558 | } |
530 | 559 | ||
531 | static void stv680_remove_sysfs_files(struct video_device *vdev) | 560 | static void stv680_remove_sysfs_files(struct video_device *vdev) |
@@ -1418,9 +1447,13 @@ static int stv680_probe (struct usb_interface *intf, const struct usb_device_id | |||
1418 | PDEBUG (0, "STV(i): registered new video device: video%d", stv680->vdev->minor); | 1447 | PDEBUG (0, "STV(i): registered new video device: video%d", stv680->vdev->minor); |
1419 | 1448 | ||
1420 | usb_set_intfdata (intf, stv680); | 1449 | usb_set_intfdata (intf, stv680); |
1421 | stv680_create_sysfs_files(stv680->vdev); | 1450 | retval = stv680_create_sysfs_files(stv680->vdev); |
1451 | if (retval) | ||
1452 | goto error_unreg; | ||
1422 | return 0; | 1453 | return 0; |
1423 | 1454 | ||
1455 | error_unreg: | ||
1456 | video_unregister_device(stv680->vdev); | ||
1424 | error_vdev: | 1457 | error_vdev: |
1425 | video_device_release(stv680->vdev); | 1458 | video_device_release(stv680->vdev); |
1426 | error: | 1459 | error: |
diff --git a/drivers/media/video/tuner-types.c b/drivers/media/video/tuner-types.c index 8fff642fad56..781682373b61 100644 --- a/drivers/media/video/tuner-types.c +++ b/drivers/media/video/tuner-types.c | |||
@@ -1046,7 +1046,6 @@ static struct tuner_params tuner_samsung_tcpn_2121p30a_params[] = { | |||
1046 | .type = TUNER_PARAM_TYPE_NTSC, | 1046 | .type = TUNER_PARAM_TYPE_NTSC, |
1047 | .ranges = tuner_samsung_tcpn_2121p30a_ntsc_ranges, | 1047 | .ranges = tuner_samsung_tcpn_2121p30a_ntsc_ranges, |
1048 | .count = ARRAY_SIZE(tuner_samsung_tcpn_2121p30a_ntsc_ranges), | 1048 | .count = ARRAY_SIZE(tuner_samsung_tcpn_2121p30a_ntsc_ranges), |
1049 | .has_tda9887 = 1, | ||
1050 | }, | 1049 | }, |
1051 | }; | 1050 | }; |
1052 | 1051 | ||
diff --git a/drivers/media/video/videodev.c b/drivers/media/video/videodev.c index 479a0675cf60..d424a4129d69 100644 --- a/drivers/media/video/videodev.c +++ b/drivers/media/video/videodev.c | |||
@@ -17,10 +17,11 @@ | |||
17 | */ | 17 | */ |
18 | 18 | ||
19 | #define dbgarg(cmd, fmt, arg...) \ | 19 | #define dbgarg(cmd, fmt, arg...) \ |
20 | if (vfd->debug & V4L2_DEBUG_IOCTL_ARG) \ | 20 | if (vfd->debug & V4L2_DEBUG_IOCTL_ARG) { \ |
21 | printk (KERN_DEBUG "%s: ", vfd->name); \ | 21 | printk (KERN_DEBUG "%s: ", vfd->name); \ |
22 | v4l_printk_ioctl(cmd); \ | 22 | v4l_printk_ioctl(cmd); \ |
23 | printk (KERN_DEBUG "%s: " fmt, vfd->name, ## arg); | 23 | printk (KERN_DEBUG "%s: " fmt, vfd->name, ## arg); \ |
24 | } | ||
24 | 25 | ||
25 | #define dbgarg2(fmt, arg...) \ | 26 | #define dbgarg2(fmt, arg...) \ |
26 | if (vfd->debug & V4L2_DEBUG_IOCTL_ARG) \ | 27 | if (vfd->debug & V4L2_DEBUG_IOCTL_ARG) \ |
@@ -1287,6 +1288,7 @@ static int __video_do_ioctl(struct inode *inode, struct file *file, | |||
1287 | ret=vfd->vidioc_g_parm(file, fh, p); | 1288 | ret=vfd->vidioc_g_parm(file, fh, p); |
1288 | } else { | 1289 | } else { |
1289 | struct v4l2_standard s; | 1290 | struct v4l2_standard s; |
1291 | int i; | ||
1290 | 1292 | ||
1291 | if (!vfd->tvnormsize) { | 1293 | if (!vfd->tvnormsize) { |
1292 | printk (KERN_WARNING "%s: no TV norms defined!\n", | 1294 | printk (KERN_WARNING "%s: no TV norms defined!\n", |
@@ -1297,8 +1299,14 @@ static int __video_do_ioctl(struct inode *inode, struct file *file, | |||
1297 | if (p->type != V4L2_BUF_TYPE_VIDEO_CAPTURE) | 1299 | if (p->type != V4L2_BUF_TYPE_VIDEO_CAPTURE) |
1298 | return -EINVAL; | 1300 | return -EINVAL; |
1299 | 1301 | ||
1300 | v4l2_video_std_construct(&s, vfd->tvnorms[vfd->current_norm].id, | 1302 | for (i = 0; i < vfd->tvnormsize; i++) |
1301 | vfd->tvnorms[vfd->current_norm].name); | 1303 | if (vfd->tvnorms[i].id == vfd->current_norm) |
1304 | break; | ||
1305 | if (i >= vfd->tvnormsize) | ||
1306 | return -EINVAL; | ||
1307 | |||
1308 | v4l2_video_std_construct(&s, vfd->current_norm, | ||
1309 | vfd->tvnorms[i].name); | ||
1302 | 1310 | ||
1303 | memset(p,0,sizeof(*p)); | 1311 | memset(p,0,sizeof(*p)); |
1304 | 1312 | ||
diff --git a/drivers/media/video/vivi.c b/drivers/media/video/vivi.c index e7c01d560b64..3c8dc72dc8e9 100644 --- a/drivers/media/video/vivi.c +++ b/drivers/media/video/vivi.c | |||
@@ -272,7 +272,7 @@ static void gen_line(struct sg_to_addr to_addr[],int inipos,int pages,int wmax, | |||
272 | 272 | ||
273 | /* Get first addr pointed to pixel position */ | 273 | /* Get first addr pointed to pixel position */ |
274 | oldpg=get_addr_pos(pos,pages,to_addr); | 274 | oldpg=get_addr_pos(pos,pages,to_addr); |
275 | pg=pfn_to_page(to_addr[oldpg].sg->dma_address >> PAGE_SHIFT); | 275 | pg=pfn_to_page(sg_dma_address(to_addr[oldpg].sg) >> PAGE_SHIFT); |
276 | basep = kmap_atomic(pg, KM_BOUNCE_READ)+to_addr[oldpg].sg->offset; | 276 | basep = kmap_atomic(pg, KM_BOUNCE_READ)+to_addr[oldpg].sg->offset; |
277 | 277 | ||
278 | /* We will just duplicate the second pixel at the packet */ | 278 | /* We will just duplicate the second pixel at the packet */ |
@@ -287,7 +287,7 @@ static void gen_line(struct sg_to_addr to_addr[],int inipos,int pages,int wmax, | |||
287 | for (color=0;color<4;color++) { | 287 | for (color=0;color<4;color++) { |
288 | pgpos=get_addr_pos(pos,pages,to_addr); | 288 | pgpos=get_addr_pos(pos,pages,to_addr); |
289 | if (pgpos!=oldpg) { | 289 | if (pgpos!=oldpg) { |
290 | pg=pfn_to_page(to_addr[pgpos].sg->dma_address >> PAGE_SHIFT); | 290 | pg=pfn_to_page(sg_dma_address(to_addr[pgpos].sg) >> PAGE_SHIFT); |
291 | kunmap_atomic(basep, KM_BOUNCE_READ); | 291 | kunmap_atomic(basep, KM_BOUNCE_READ); |
292 | basep= kmap_atomic(pg, KM_BOUNCE_READ)+to_addr[pgpos].sg->offset; | 292 | basep= kmap_atomic(pg, KM_BOUNCE_READ)+to_addr[pgpos].sg->offset; |
293 | oldpg=pgpos; | 293 | oldpg=pgpos; |
@@ -339,8 +339,8 @@ static void gen_line(struct sg_to_addr to_addr[],int inipos,int pages,int wmax, | |||
339 | for (color=0;color<4;color++) { | 339 | for (color=0;color<4;color++) { |
340 | pgpos=get_addr_pos(pos,pages,to_addr); | 340 | pgpos=get_addr_pos(pos,pages,to_addr); |
341 | if (pgpos!=oldpg) { | 341 | if (pgpos!=oldpg) { |
342 | pg=pfn_to_page(to_addr[pgpos]. | 342 | pg=pfn_to_page(sg_dma_address( |
343 | sg->dma_address | 343 | to_addr[pgpos].sg) |
344 | >> PAGE_SHIFT); | 344 | >> PAGE_SHIFT); |
345 | kunmap_atomic(basep, | 345 | kunmap_atomic(basep, |
346 | KM_BOUNCE_READ); | 346 | KM_BOUNCE_READ); |
@@ -386,7 +386,7 @@ static void vivi_fillbuff(struct vivi_dev *dev,struct vivi_buffer *buf) | |||
386 | struct timeval ts; | 386 | struct timeval ts; |
387 | 387 | ||
388 | /* Test if DMA mapping is ready */ | 388 | /* Test if DMA mapping is ready */ |
389 | if (!vb->dma.sglist[0].dma_address) | 389 | if (!sg_dma_address(&vb->dma.sglist[0])) |
390 | return; | 390 | return; |
391 | 391 | ||
392 | prep_to_addr(to_addr,vb); | 392 | prep_to_addr(to_addr,vb); |
@@ -783,7 +783,7 @@ static int vivi_map_sg(void *dev, struct scatterlist *sg, int nents, | |||
783 | for (i = 0; i < nents; i++ ) { | 783 | for (i = 0; i < nents; i++ ) { |
784 | BUG_ON(!sg[i].page); | 784 | BUG_ON(!sg[i].page); |
785 | 785 | ||
786 | sg[i].dma_address = page_to_phys(sg[i].page) + sg[i].offset; | 786 | sg_dma_address(&sg[i]) = page_to_phys(sg[i].page) + sg[i].offset; |
787 | } | 787 | } |
788 | 788 | ||
789 | return nents; | 789 | return nents; |
diff --git a/fs/cifs/cifssmb.c b/fs/cifs/cifssmb.c index 5dc5a966bd5f..098790eb2aa1 100644 --- a/fs/cifs/cifssmb.c +++ b/fs/cifs/cifssmb.c | |||
@@ -399,6 +399,7 @@ CIFSSMBNegotiate(unsigned int xid, struct cifsSesInfo *ses) | |||
399 | struct TCP_Server_Info * server; | 399 | struct TCP_Server_Info * server; |
400 | u16 count; | 400 | u16 count; |
401 | unsigned int secFlags; | 401 | unsigned int secFlags; |
402 | u16 dialect; | ||
402 | 403 | ||
403 | if(ses->server) | 404 | if(ses->server) |
404 | server = ses->server; | 405 | server = ses->server; |
@@ -438,9 +439,10 @@ CIFSSMBNegotiate(unsigned int xid, struct cifsSesInfo *ses) | |||
438 | if (rc != 0) | 439 | if (rc != 0) |
439 | goto neg_err_exit; | 440 | goto neg_err_exit; |
440 | 441 | ||
441 | cFYI(1,("Dialect: %d", pSMBr->DialectIndex)); | 442 | dialect = le16_to_cpu(pSMBr->DialectIndex); |
443 | cFYI(1,("Dialect: %d", dialect)); | ||
442 | /* Check wct = 1 error case */ | 444 | /* Check wct = 1 error case */ |
443 | if((pSMBr->hdr.WordCount < 13) || (pSMBr->DialectIndex == BAD_PROT)) { | 445 | if((pSMBr->hdr.WordCount < 13) || (dialect == BAD_PROT)) { |
444 | /* core returns wct = 1, but we do not ask for core - otherwise | 446 | /* core returns wct = 1, but we do not ask for core - otherwise |
445 | small wct just comes when dialect index is -1 indicating we | 447 | small wct just comes when dialect index is -1 indicating we |
446 | could not negotiate a common dialect */ | 448 | could not negotiate a common dialect */ |
@@ -448,8 +450,8 @@ CIFSSMBNegotiate(unsigned int xid, struct cifsSesInfo *ses) | |||
448 | goto neg_err_exit; | 450 | goto neg_err_exit; |
449 | #ifdef CONFIG_CIFS_WEAK_PW_HASH | 451 | #ifdef CONFIG_CIFS_WEAK_PW_HASH |
450 | } else if((pSMBr->hdr.WordCount == 13) | 452 | } else if((pSMBr->hdr.WordCount == 13) |
451 | && ((pSMBr->DialectIndex == LANMAN_PROT) | 453 | && ((dialect == LANMAN_PROT) |
452 | || (pSMBr->DialectIndex == LANMAN2_PROT))) { | 454 | || (dialect == LANMAN2_PROT))) { |
453 | __s16 tmp; | 455 | __s16 tmp; |
454 | struct lanman_neg_rsp * rsp = (struct lanman_neg_rsp *)pSMBr; | 456 | struct lanman_neg_rsp * rsp = (struct lanman_neg_rsp *)pSMBr; |
455 | 457 | ||
@@ -2943,7 +2945,7 @@ QInfRetry: | |||
2943 | ts.tv_nsec = 0; | 2945 | ts.tv_nsec = 0; |
2944 | ts.tv_sec = time; | 2946 | ts.tv_sec = time; |
2945 | /* decode time fields */ | 2947 | /* decode time fields */ |
2946 | pFinfo->ChangeTime = cifs_UnixTimeToNT(ts); | 2948 | pFinfo->ChangeTime = cpu_to_le64(cifs_UnixTimeToNT(ts)); |
2947 | pFinfo->LastWriteTime = pFinfo->ChangeTime; | 2949 | pFinfo->LastWriteTime = pFinfo->ChangeTime; |
2948 | pFinfo->LastAccessTime = 0; | 2950 | pFinfo->LastAccessTime = 0; |
2949 | pFinfo->AllocationSize = | 2951 | pFinfo->AllocationSize = |
diff --git a/include/asm-m68k/sun3mmu.h b/include/asm-m68k/sun3mmu.h index 6c8c17d047a1..d8f17a0d8c9f 100644 --- a/include/asm-m68k/sun3mmu.h +++ b/include/asm-m68k/sun3mmu.h | |||
@@ -4,6 +4,7 @@ | |||
4 | #ifndef __SUN3_MMU_H__ | 4 | #ifndef __SUN3_MMU_H__ |
5 | #define __SUN3_MMU_H__ | 5 | #define __SUN3_MMU_H__ |
6 | 6 | ||
7 | #include <linux/types.h> | ||
7 | #include <asm/movs.h> | 8 | #include <asm/movs.h> |
8 | #include <asm/sun3-head.h> | 9 | #include <asm/sun3-head.h> |
9 | 10 | ||
@@ -160,7 +161,7 @@ static inline void sun3_put_context(unsigned char c) | |||
160 | return; | 161 | return; |
161 | } | 162 | } |
162 | 163 | ||
163 | extern void *sun3_ioremap(unsigned long phys, unsigned long size, | 164 | extern void __iomem *sun3_ioremap(unsigned long phys, unsigned long size, |
164 | unsigned long type); | 165 | unsigned long type); |
165 | 166 | ||
166 | extern int sun3_map_test(unsigned long addr, char *val); | 167 | extern int sun3_map_test(unsigned long addr, char *val); |
diff --git a/include/linux/videodev2.h b/include/linux/videodev2.h index c5fdf6259548..df5c4654360d 100644 --- a/include/linux/videodev2.h +++ b/include/linux/videodev2.h | |||
@@ -243,7 +243,7 @@ struct v4l2_pix_format | |||
243 | #define V4L2_PIX_FMT_YUV420 v4l2_fourcc('Y','U','1','2') /* 12 YUV 4:2:0 */ | 243 | #define V4L2_PIX_FMT_YUV420 v4l2_fourcc('Y','U','1','2') /* 12 YUV 4:2:0 */ |
244 | #define V4L2_PIX_FMT_YYUV v4l2_fourcc('Y','Y','U','V') /* 16 YUV 4:2:2 */ | 244 | #define V4L2_PIX_FMT_YYUV v4l2_fourcc('Y','Y','U','V') /* 16 YUV 4:2:2 */ |
245 | #define V4L2_PIX_FMT_HI240 v4l2_fourcc('H','I','2','4') /* 8 8-bit color */ | 245 | #define V4L2_PIX_FMT_HI240 v4l2_fourcc('H','I','2','4') /* 8 8-bit color */ |
246 | #define V4L2_PIX_FMT_HM12 v4l2_fourcc('H','M','1','2') /* 8 YUV 4:1:1 16x16 macroblocks */ | 246 | #define V4L2_PIX_FMT_HM12 v4l2_fourcc('H','M','1','2') /* 8 YUV 4:2:0 16x16 macroblocks */ |
247 | 247 | ||
248 | /* see http://www.siliconimaging.com/RGB%20Bayer.htm */ | 248 | /* see http://www.siliconimaging.com/RGB%20Bayer.htm */ |
249 | #define V4L2_PIX_FMT_SBGGR8 v4l2_fourcc('B','A','8','1') /* 8 BGBG.. GRGR.. */ | 249 | #define V4L2_PIX_FMT_SBGGR8 v4l2_fourcc('B','A','8','1') /* 8 BGBG.. GRGR.. */ |
diff --git a/include/net/netlabel.h b/include/net/netlabel.h index 113337c27955..12c214b9eadf 100644 --- a/include/net/netlabel.h +++ b/include/net/netlabel.h | |||
@@ -136,7 +136,7 @@ struct netlbl_lsm_secattr { | |||
136 | * on success, NULL on failure. | 136 | * on success, NULL on failure. |
137 | * | 137 | * |
138 | */ | 138 | */ |
139 | static inline struct netlbl_lsm_cache *netlbl_secattr_cache_alloc(int flags) | 139 | static inline struct netlbl_lsm_cache *netlbl_secattr_cache_alloc(gfp_t flags) |
140 | { | 140 | { |
141 | struct netlbl_lsm_cache *cache; | 141 | struct netlbl_lsm_cache *cache; |
142 | 142 | ||