Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 322071
b: refs/heads/master
c: 61e01be
h: refs/heads/master
i:
  322069: 6f28730
  322067: 51841ea
  322063: fc9aa70
v: v3
  • Loading branch information
Jens Rottmann authored and Linus Torvalds committed Aug 21, 2012
1 parent 4213ce4 commit a5251a9
Show file tree
Hide file tree
Showing 106 changed files with 764 additions and 869 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: a484147a52e6910d990ae7cf2a5d16b5bc58dcbe
refs/heads/master: 61e01be22e954f53a4bbac8066015d9f4ab9e42d
2 changes: 1 addition & 1 deletion trunk/Documentation/DocBook/media/v4l/vidioc-g-tuner.xml
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ the structure refers to a radio tuner the
<constant>V4L2_TUNER_CAP_NORM</constant> flags can't be used.</para>
<para>If multiple frequency bands are supported, then
<structfield>capability</structfield> is the union of all
<structfield>capability</structfield> fields of each &v4l2-frequency-band;.
<structfield>capability></structfield> fields of each &v4l2-frequency-band;.
</para></entry>
</row>
<row>
Expand Down
19 changes: 2 additions & 17 deletions trunk/Documentation/networking/netconsole.txt
Original file line number Diff line number Diff line change
Expand Up @@ -51,23 +51,8 @@ Built-in netconsole starts immediately after the TCP stack is
initialized and attempts to bring up the supplied dev at the supplied
address.

The remote host has several options to receive the kernel messages,
for example:

1) syslogd

2) netcat

On distributions using a BSD-based netcat version (e.g. Fedora,
openSUSE and Ubuntu) the listening port must be specified without
the -p switch:

'nc -u -l -p <port>' / 'nc -u -l <port>' or
'netcat -u -l -p <port>' / 'netcat -u -l <port>'

3) socat

'socat udp-recv:<port> -'
The remote host can run either 'netcat -u -l -p <port>',
'nc -l -u <port>' or syslogd.

Dynamic reconfiguration:
========================
Expand Down
6 changes: 0 additions & 6 deletions trunk/MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -7288,12 +7288,6 @@ W: http://www.connecttech.com
S: Supported
F: drivers/usb/serial/whiteheat*

USB SMSC75XX ETHERNET DRIVER
M: Steve Glendinning <steve.glendinning@shawell.net>
L: netdev@vger.kernel.org
S: Maintained
F: drivers/net/usb/smsc75xx.*

USB SMSC95XX ETHERNET DRIVER
M: Steve Glendinning <steve.glendinning@shawell.net>
L: netdev@vger.kernel.org
Expand Down
2 changes: 0 additions & 2 deletions trunk/drivers/bluetooth/ath3k.c
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@ static struct usb_device_id ath3k_table[] = {
{ USB_DEVICE(0x13d3, 0x3362) },
{ USB_DEVICE(0x0CF3, 0xE004) },
{ USB_DEVICE(0x0930, 0x0219) },
{ USB_DEVICE(0x0489, 0xe057) },

/* Atheros AR5BBU12 with sflash firmware */
{ USB_DEVICE(0x0489, 0xE02C) },
Expand All @@ -105,7 +104,6 @@ static struct usb_device_id ath3k_blist_tbl[] = {
{ USB_DEVICE(0x13d3, 0x3362), .driver_info = BTUSB_ATH3012 },
{ USB_DEVICE(0x0cf3, 0xe004), .driver_info = BTUSB_ATH3012 },
{ USB_DEVICE(0x0930, 0x0219), .driver_info = BTUSB_ATH3012 },
{ USB_DEVICE(0x0489, 0xe057), .driver_info = BTUSB_ATH3012 },

/* Atheros AR5BBU22 with sflash firmware */
{ USB_DEVICE(0x0489, 0xE03C), .driver_info = BTUSB_ATH3012 },
Expand Down
2 changes: 0 additions & 2 deletions trunk/drivers/bluetooth/btusb.c
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,6 @@ static struct usb_device_id btusb_table[] = {
{ USB_DEVICE(0x0a5c, 0x21e6) },
{ USB_DEVICE(0x0a5c, 0x21e8) },
{ USB_DEVICE(0x0a5c, 0x21f3) },
{ USB_DEVICE(0x0a5c, 0x21f4) },
{ USB_DEVICE(0x413c, 0x8197) },

/* Foxconn - Hon Hai */
Expand Down Expand Up @@ -134,7 +133,6 @@ static struct usb_device_id blacklist_table[] = {
{ USB_DEVICE(0x13d3, 0x3362), .driver_info = BTUSB_ATH3012 },
{ USB_DEVICE(0x0cf3, 0xe004), .driver_info = BTUSB_ATH3012 },
{ USB_DEVICE(0x0930, 0x0219), .driver_info = BTUSB_ATH3012 },
{ USB_DEVICE(0x0489, 0xe057), .driver_info = BTUSB_ATH3012 },

/* Atheros AR5BBU12 with sflash firmware */
{ USB_DEVICE(0x0489, 0xe02c), .driver_info = BTUSB_IGNORE },
Expand Down
4 changes: 2 additions & 2 deletions trunk/drivers/clocksource/cs5535-clockevt.c
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ static struct cs5535_mfgpt_timer *cs5535_event_clock;
#define MFGPT_PERIODIC (MFGPT_HZ / HZ)

/*
* The MFPGT timers on the CS5536 provide us with suitable timers to use
* The MFGPT timers on the CS5536 provide us with suitable timers to use
* as clock event sources - not as good as a HPET or APIC, but certainly
* better than the PIT. This isn't a general purpose MFGPT driver, but
* a simplified one designed specifically to act as a clock event source.
Expand Down Expand Up @@ -144,7 +144,7 @@ static int __init cs5535_mfgpt_init(void)

timer = cs5535_mfgpt_alloc_timer(MFGPT_TIMER_ANY, MFGPT_DOMAIN_WORKING);
if (!timer) {
printk(KERN_ERR DRV_NAME ": Could not allocate MFPGT timer\n");
printk(KERN_ERR DRV_NAME ": Could not allocate MFGPT timer\n");
return -ENODEV;
}
cs5535_event_clock = timer;
Expand Down
151 changes: 73 additions & 78 deletions trunk/drivers/media/radio/radio-shark.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,6 @@
#include <media/v4l2-device.h>
#include <sound/tea575x-tuner.h>

#if defined(CONFIG_LEDS_CLASS) || \
(defined(CONFIG_LEDS_CLASS_MODULE) && defined(CONFIG_RADIO_SHARK_MODULE))
#define SHARK_USE_LEDS 1
#endif

/*
* Version Information
*/
Expand All @@ -61,18 +56,44 @@ MODULE_LICENSE("GPL");

enum { BLUE_LED, BLUE_PULSE_LED, RED_LED, NO_LEDS };

static void shark_led_set_blue(struct led_classdev *led_cdev,
enum led_brightness value);
static void shark_led_set_blue_pulse(struct led_classdev *led_cdev,
enum led_brightness value);
static void shark_led_set_red(struct led_classdev *led_cdev,
enum led_brightness value);

static const struct led_classdev shark_led_templates[NO_LEDS] = {
[BLUE_LED] = {
.name = "%s:blue:",
.brightness = LED_OFF,
.max_brightness = 127,
.brightness_set = shark_led_set_blue,
},
[BLUE_PULSE_LED] = {
.name = "%s:blue-pulse:",
.brightness = LED_OFF,
.max_brightness = 255,
.brightness_set = shark_led_set_blue_pulse,
},
[RED_LED] = {
.name = "%s:red:",
.brightness = LED_OFF,
.max_brightness = 1,
.brightness_set = shark_led_set_red,
},
};

struct shark_device {
struct usb_device *usbdev;
struct v4l2_device v4l2_dev;
struct snd_tea575x tea;

#ifdef SHARK_USE_LEDS
struct work_struct led_work;
struct led_classdev leds[NO_LEDS];
char led_names[NO_LEDS][32];
atomic_t brightness[NO_LEDS];
unsigned long brightness_new;
#endif

u8 *transfer_buffer;
u32 last_val;
Expand Down Expand Up @@ -154,13 +175,20 @@ static struct snd_tea575x_ops shark_tea_ops = {
.read_val = shark_read_val,
};

#ifdef SHARK_USE_LEDS
static void shark_led_work(struct work_struct *work)
{
struct shark_device *shark =
container_of(work, struct shark_device, led_work);
int i, res, brightness, actual_len;

/*
* We use the v4l2_dev lock and registered bit to ensure the device
* does not get unplugged and unreffed while we're running.
*/
mutex_lock(&shark->tea.mutex);
if (!video_is_registered(&shark->tea.vd))
goto leave;

for (i = 0; i < 3; i++) {
if (!test_and_clear_bit(i, &shark->brightness_new))
continue;
Expand All @@ -180,6 +208,8 @@ static void shark_led_work(struct work_struct *work)
v4l2_err(&shark->v4l2_dev, "set LED %s error: %d\n",
shark->led_names[i], res);
}
leave:
mutex_unlock(&shark->tea.mutex);
}

static void shark_led_set_blue(struct led_classdev *led_cdev,
Expand Down Expand Up @@ -215,78 +245,19 @@ static void shark_led_set_red(struct led_classdev *led_cdev,
schedule_work(&shark->led_work);
}

static const struct led_classdev shark_led_templates[NO_LEDS] = {
[BLUE_LED] = {
.name = "%s:blue:",
.brightness = LED_OFF,
.max_brightness = 127,
.brightness_set = shark_led_set_blue,
},
[BLUE_PULSE_LED] = {
.name = "%s:blue-pulse:",
.brightness = LED_OFF,
.max_brightness = 255,
.brightness_set = shark_led_set_blue_pulse,
},
[RED_LED] = {
.name = "%s:red:",
.brightness = LED_OFF,
.max_brightness = 1,
.brightness_set = shark_led_set_red,
},
};

static int shark_register_leds(struct shark_device *shark, struct device *dev)
{
int i, retval;

INIT_WORK(&shark->led_work, shark_led_work);
for (i = 0; i < NO_LEDS; i++) {
shark->leds[i] = shark_led_templates[i];
snprintf(shark->led_names[i], sizeof(shark->led_names[0]),
shark->leds[i].name, shark->v4l2_dev.name);
shark->leds[i].name = shark->led_names[i];
retval = led_classdev_register(dev, &shark->leds[i]);
if (retval) {
v4l2_err(&shark->v4l2_dev,
"couldn't register led: %s\n",
shark->led_names[i]);
return retval;
}
}
return 0;
}

static void shark_unregister_leds(struct shark_device *shark)
{
int i;

for (i = 0; i < NO_LEDS; i++)
led_classdev_unregister(&shark->leds[i]);

cancel_work_sync(&shark->led_work);
}
#else
static int shark_register_leds(struct shark_device *shark, struct device *dev)
{
v4l2_warn(&shark->v4l2_dev,
"CONFIG_LED_CLASS not enabled, LED support disabled\n");
return 0;
}
static inline void shark_unregister_leds(struct shark_device *shark) { }
#endif

static void usb_shark_disconnect(struct usb_interface *intf)
{
struct v4l2_device *v4l2_dev = usb_get_intfdata(intf);
struct shark_device *shark = v4l2_dev_to_shark(v4l2_dev);
int i;

mutex_lock(&shark->tea.mutex);
v4l2_device_disconnect(&shark->v4l2_dev);
snd_tea575x_exit(&shark->tea);
mutex_unlock(&shark->tea.mutex);

shark_unregister_leds(shark);
for (i = 0; i < NO_LEDS; i++)
led_classdev_unregister(&shark->leds[i]);

v4l2_device_put(&shark->v4l2_dev);
}
Expand All @@ -295,6 +266,7 @@ static void usb_shark_release(struct v4l2_device *v4l2_dev)
{
struct shark_device *shark = v4l2_dev_to_shark(v4l2_dev);

cancel_work_sync(&shark->led_work);
v4l2_device_unregister(&shark->v4l2_dev);
kfree(shark->transfer_buffer);
kfree(shark);
Expand All @@ -304,7 +276,7 @@ static int usb_shark_probe(struct usb_interface *intf,
const struct usb_device_id *id)
{
struct shark_device *shark;
int retval = -ENOMEM;
int i, retval = -ENOMEM;

shark = kzalloc(sizeof(struct shark_device), GFP_KERNEL);
if (!shark)
Expand All @@ -314,13 +286,17 @@ static int usb_shark_probe(struct usb_interface *intf,
if (!shark->transfer_buffer)
goto err_alloc_buffer;

v4l2_device_set_name(&shark->v4l2_dev, DRV_NAME, &shark_instance);

retval = shark_register_leds(shark, &intf->dev);
if (retval)
goto err_reg_leds;
/*
* Work around a bug in usbhid/hid-core.c, where it leaves a dangling
* pointer in intfdata causing v4l2-device.c to not set it. Which
* results in usb_shark_disconnect() referencing the dangling pointer
*
* REMOVE (as soon as the above bug is fixed, patch submitted)
*/
usb_set_intfdata(intf, NULL);

shark->v4l2_dev.release = usb_shark_release;
v4l2_device_set_name(&shark->v4l2_dev, DRV_NAME, &shark_instance);
retval = v4l2_device_register(&intf->dev, &shark->v4l2_dev);
if (retval) {
v4l2_err(&shark->v4l2_dev, "couldn't register v4l2_device\n");
Expand All @@ -344,13 +320,32 @@ static int usb_shark_probe(struct usb_interface *intf,
goto err_init_tea;
}

INIT_WORK(&shark->led_work, shark_led_work);
for (i = 0; i < NO_LEDS; i++) {
shark->leds[i] = shark_led_templates[i];
snprintf(shark->led_names[i], sizeof(shark->led_names[0]),
shark->leds[i].name, shark->v4l2_dev.name);
shark->leds[i].name = shark->led_names[i];
/*
* We don't fail the probe if we fail to register the leds,
* because once we've called snd_tea575x_init, the /dev/radio0
* node may be opened from userspace holding a reference to us!
*
* Note we cannot register the leds first instead as
* shark_led_work depends on the v4l2 mutex and registered bit.
*/
retval = led_classdev_register(&intf->dev, &shark->leds[i]);
if (retval)
v4l2_err(&shark->v4l2_dev,
"couldn't register led: %s\n",
shark->led_names[i]);
}

return 0;

err_init_tea:
v4l2_device_unregister(&shark->v4l2_dev);
err_reg_dev:
shark_unregister_leds(shark);
err_reg_leds:
kfree(shark->transfer_buffer);
err_alloc_buffer:
kfree(shark);
Expand Down
Loading

0 comments on commit a5251a9

Please sign in to comment.