Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 322489
b: refs/heads/master
c: 79c5fce
h: refs/heads/master
i:
  322487: dca0f4c
v: v3
  • Loading branch information
Jesse Larrew authored and Benjamin Herrenschmidt committed Sep 5, 2012
1 parent 80cb264 commit 3791275
Show file tree
Hide file tree
Showing 21 changed files with 49 additions and 111 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: 813e64382a8a4afcbfd7caeba40292a8ea6d5cc3
refs/heads/master: 79c5fcebfe4021f326a6715009f0b6b622d5df92
7 changes: 4 additions & 3 deletions trunk/arch/powerpc/mm/numa.c
Original file line number Diff line number Diff line change
Expand Up @@ -1436,11 +1436,11 @@ static long vphn_get_associativity(unsigned long cpu,

/*
* Update the node maps and sysfs entries for each cpu whose home node
* has changed.
* has changed. Returns 1 when the topology has changed, and 0 otherwise.
*/
int arch_update_cpu_topology(void)
{
int cpu, nid, old_nid;
int cpu, nid, old_nid, changed = 0;
unsigned int associativity[VPHN_ASSOC_BUFSIZE] = {0};
struct device *dev;

Expand All @@ -1466,9 +1466,10 @@ int arch_update_cpu_topology(void)
dev = get_cpu_device(cpu);
if (dev)
kobject_uevent(&dev->kobj, KOBJ_CHANGE);
changed = 1;
}

return 1;
return changed;
}

static void topology_work_fn(struct work_struct *work)
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/gpio/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ config GPIO_MAX732X_IRQ

config GPIO_MC9S08DZ60
bool "MX35 3DS BOARD MC9S08DZ60 GPIO functions"
depends on I2C=y && MACH_MX35_3DS
depends on I2C && MACH_MX35_3DS
help
Select this to enable the MC9S08DZ60 GPIO driver

Expand Down
4 changes: 2 additions & 2 deletions trunk/drivers/gpio/gpio-em.c
Original file line number Diff line number Diff line change
Expand Up @@ -247,9 +247,9 @@ static int __devinit em_gio_irq_domain_init(struct em_gio_priv *p)

p->irq_base = irq_alloc_descs(pdata->irq_base, 0,
pdata->number_of_pins, numa_node_id());
if (p->irq_base < 0) {
if (IS_ERR_VALUE(p->irq_base)) {
dev_err(&pdev->dev, "cannot get irq_desc\n");
return p->irq_base;
return -ENXIO;
}
pr_debug("gio: hw base = %d, nr = %d, sw base = %d\n",
pdata->gpio_base, pdata->number_of_pins, p->irq_base);
Expand Down
1 change: 0 additions & 1 deletion trunk/drivers/gpio/gpio-rdc321x.c
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,6 @@ static int __devinit rdc321x_gpio_probe(struct platform_device *pdev)
rdc321x_gpio_dev->reg2_data_base = r->start + 0x4;

rdc321x_gpio_dev->chip.label = "rdc321x-gpio";
rdc321x_gpio_dev->chip.owner = THIS_MODULE;
rdc321x_gpio_dev->chip.direction_input = rdc_gpio_direction_input;
rdc321x_gpio_dev->chip.direction_output = rdc_gpio_config;
rdc321x_gpio_dev->chip.get = rdc_gpio_get_value;
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/gpio/gpiolib-of.c
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ int of_get_named_gpio_flags(struct device_node *np, const char *propname,
gpiochip_find(&gg_data, of_gpiochip_find_and_xlate);

of_node_put(gg_data.gpiospec.np);
pr_debug("%s exited with status %d\n", __func__, gg_data.out_gpio);
pr_debug("%s exited with status %d\n", __func__, ret);
return gg_data.out_gpio;
}
EXPORT_SYMBOL(of_get_named_gpio_flags);
Expand Down
4 changes: 2 additions & 2 deletions trunk/drivers/mtd/ubi/vtbl.c
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,7 @@ static int create_vtbl(struct ubi_device *ubi, struct ubi_attach_info *ai,
* of this LEB as it will be deleted and freed in 'ubi_add_to_av()'.
*/
err = ubi_add_to_av(ubi, ai, new_aeb->pnum, new_aeb->ec, vid_hdr, 0);
kmem_cache_free(ai->aeb_slab_cache, new_aeb);
kfree(new_aeb);
ubi_free_vid_hdr(ubi, vid_hdr);
return err;

Expand All @@ -353,7 +353,7 @@ static int create_vtbl(struct ubi_device *ubi, struct ubi_attach_info *ai,
list_add(&new_aeb->u.list, &ai->erase);
goto retry;
}
kmem_cache_free(ai->aeb_slab_cache, new_aeb);
kfree(new_aeb);
out_free:
ubi_free_vid_hdr(ubi, vid_hdr);
return err;
Expand Down
2 changes: 2 additions & 0 deletions trunk/drivers/video/auo_k190x.c
Original file line number Diff line number Diff line change
Expand Up @@ -987,6 +987,7 @@ int __devinit auok190x_common_probe(struct platform_device *pdev,
fb_dealloc_cmap(&info->cmap);
err_cmap:
fb_deferred_io_cleanup(info);
kfree(info->fbdefio);
err_defio:
vfree((void *)info->screen_base);
err_irq:
Expand Down Expand Up @@ -1021,6 +1022,7 @@ int __devexit auok190x_common_remove(struct platform_device *pdev)
fb_dealloc_cmap(&info->cmap);

fb_deferred_io_cleanup(info);
kfree(info->fbdefio);

vfree((void *)info->screen_base);

Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/video/console/bitblit.c
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ static void bit_putcs(struct vc_data *vc, struct fb_info *info,
image.depth = 1;

if (attribute) {
buf = kmalloc(cellsize, GFP_ATOMIC);
buf = kmalloc(cellsize, GFP_KERNEL);
if (!buf)
return;
}
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/video/console/fbcon.c
Original file line number Diff line number Diff line change
Expand Up @@ -449,7 +449,7 @@ static int __init fb_console_setup(char *this_opt)

while ((options = strsep(&this_opt, ",")) != NULL) {
if (!strncmp(options, "font:", 5))
strlcpy(fontname, options + 5, sizeof(fontname));
strcpy(fontname, options + 5);

if (!strncmp(options, "scrollback:", 11)) {
options += 11;
Expand Down
2 changes: 0 additions & 2 deletions trunk/drivers/video/mb862xx/mb862xxfbdrv.c
Original file line number Diff line number Diff line change
Expand Up @@ -328,8 +328,6 @@ static int mb862xxfb_ioctl(struct fb_info *fbi, unsigned int cmd,
case MB862XX_L1_SET_CFG:
if (copy_from_user(l1_cfg, argp, sizeof(*l1_cfg)))
return -EFAULT;
if (l1_cfg->dh == 0 || l1_cfg->dw == 0)
return -EINVAL;
if ((l1_cfg->sw >= l1_cfg->dw) && (l1_cfg->sh >= l1_cfg->dh)) {
/* downscaling */
outreg(cap, GC_CAP_CSC,
Expand Down
14 changes: 0 additions & 14 deletions trunk/drivers/video/omap2/dss/sdi.c
Original file line number Diff line number Diff line change
Expand Up @@ -105,20 +105,6 @@ int omapdss_sdi_display_enable(struct omap_dss_device *dssdev)

sdi_config_lcd_manager(dssdev);

/*
* LCLK and PCLK divisors are located in shadow registers, and we
* normally write them to DISPC registers when enabling the output.
* However, SDI uses pck-free as source clock for its PLL, and pck-free
* is affected by the divisors. And as we need the PLL before enabling
* the output, we need to write the divisors early.
*
* It seems just writing to the DISPC register is enough, and we don't
* need to care about the shadow register mechanism for pck-free. The
* exact reason for this is unknown.
*/
dispc_mgr_set_clock_div(dssdev->manager->id,
&sdi.mgr_config.clock_info);

dss_sdi_init(dssdev->phy.sdi.datapairs);
r = dss_sdi_enable();
if (r)
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/video/omap2/omapfb/omapfb-main.c
Original file line number Diff line number Diff line change
Expand Up @@ -1192,7 +1192,7 @@ static int _setcolreg(struct fb_info *fbi, u_int regno, u_int red, u_int green,
break;

if (regno < 16) {
u32 pal;
u16 pal;
pal = ((red >> (16 - var->red.length)) <<
var->red.offset) |
((green >> (16 - var->green.length)) <<
Expand Down
4 changes: 2 additions & 2 deletions trunk/net/socket.c
Original file line number Diff line number Diff line change
Expand Up @@ -2604,7 +2604,7 @@ static int do_siocgstamp(struct net *net, struct socket *sock,
err = sock_do_ioctl(net, sock, cmd, (unsigned long)&ktv);
set_fs(old_fs);
if (!err)
err = compat_put_timeval(&ktv, up);
err = compat_put_timeval(up, &ktv);

return err;
}
Expand All @@ -2620,7 +2620,7 @@ static int do_siocgstampns(struct net *net, struct socket *sock,
err = sock_do_ioctl(net, sock, cmd, (unsigned long)&kts);
set_fs(old_fs);
if (!err)
err = compat_put_timespec(&kts, up);
err = compat_put_timespec(up, &kts);

return err;
}
Expand Down
10 changes: 2 additions & 8 deletions trunk/sound/pci/hda/hda_codec.c
Original file line number Diff line number Diff line change
Expand Up @@ -1209,9 +1209,6 @@ static void snd_hda_codec_free(struct hda_codec *codec)
kfree(codec);
}

static bool snd_hda_codec_get_supported_ps(struct hda_codec *codec,
hda_nid_t fg, unsigned int power_state);

static void hda_set_power_state(struct hda_codec *codec, hda_nid_t fg,
unsigned int power_state);

Expand Down Expand Up @@ -1320,10 +1317,6 @@ int /*__devinit*/ snd_hda_codec_new(struct hda_bus *bus,
AC_VERB_GET_SUBSYSTEM_ID, 0);
}

codec->epss = snd_hda_codec_get_supported_ps(codec,
codec->afg ? codec->afg : codec->mfg,
AC_PWRST_EPSS);

/* power-up all before initialization */
hda_set_power_state(codec,
codec->afg ? codec->afg : codec->mfg,
Expand Down Expand Up @@ -3550,7 +3543,8 @@ static void hda_set_power_state(struct hda_codec *codec, hda_nid_t fg,
/* this delay seems necessary to avoid click noise at power-down */
if (power_state == AC_PWRST_D3) {
/* transition time less than 10ms for power down */
msleep(codec->epss ? 10 : 100);
bool epss = snd_hda_codec_get_supported_ps(codec, fg, AC_PWRST_EPSS);
msleep(epss ? 10 : 100);
}

/* repeat power states setting at most 10 times*/
Expand Down
1 change: 0 additions & 1 deletion trunk/sound/pci/hda/hda_codec.h
Original file line number Diff line number Diff line change
Expand Up @@ -862,7 +862,6 @@ struct hda_codec {
unsigned int ignore_misc_bit:1; /* ignore MISC_NO_PRESENCE bit */
unsigned int no_jack_detect:1; /* Machine has no jack-detection */
unsigned int pcm_format_first:1; /* PCM format must be set first */
unsigned int epss:1; /* supporting EPSS? */
#ifdef CONFIG_SND_HDA_POWER_SAVE
unsigned int power_on :1; /* current (global) power-state */
int power_transition; /* power-state in transition */
Expand Down
4 changes: 0 additions & 4 deletions trunk/sound/pci/hda/patch_sigmatel.c
Original file line number Diff line number Diff line change
Expand Up @@ -4543,9 +4543,6 @@ static void stac92xx_line_out_detect(struct hda_codec *codec,
struct auto_pin_cfg *cfg = &spec->autocfg;
int i;

if (cfg->speaker_outs == 0)
return;

for (i = 0; i < cfg->line_outs; i++) {
if (presence)
break;
Expand Down Expand Up @@ -5534,7 +5531,6 @@ static int patch_stac92hd83xxx(struct hda_codec *codec)
snd_hda_codec_set_pincfg(codec, 0xf, 0x2181205e);
}

codec->epss = 0; /* longer delay needed for D3 */
codec->no_trigger_sense = 1;
codec->spec = spec;

Expand Down
4 changes: 2 additions & 2 deletions trunk/sound/usb/card.c
Original file line number Diff line number Diff line change
Expand Up @@ -553,7 +553,7 @@ static void snd_usb_audio_disconnect(struct usb_device *dev,
struct snd_usb_audio *chip)
{
struct snd_card *card;
struct list_head *p, *n;
struct list_head *p;

if (chip == (void *)-1L)
return;
Expand All @@ -570,7 +570,7 @@ static void snd_usb_audio_disconnect(struct usb_device *dev,
snd_usb_stream_disconnect(p);
}
/* release the endpoint resources */
list_for_each_safe(p, n, &chip->ep_list) {
list_for_each(p, &chip->ep_list) {
snd_usb_endpoint_free(p);
}
/* release the midi resources */
Expand Down
24 changes: 14 additions & 10 deletions trunk/sound/usb/endpoint.c
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ int snd_usb_endpoint_implict_feedback_sink(struct snd_usb_endpoint *ep)
*
* For implicit feedback, next_packet_size() is unused.
*/
int snd_usb_endpoint_next_packet_size(struct snd_usb_endpoint *ep)
static int next_packet_size(struct snd_usb_endpoint *ep)
{
unsigned long flags;
int ret;
Expand Down Expand Up @@ -177,6 +177,15 @@ static void retire_inbound_urb(struct snd_usb_endpoint *ep,
ep->retire_data_urb(ep->data_subs, urb);
}

static void prepare_outbound_urb_sizes(struct snd_usb_endpoint *ep,
struct snd_urb_ctx *ctx)
{
int i;

for (i = 0; i < ctx->packets; ++i)
ctx->packet_size[i] = next_packet_size(ep);
}

/*
* Prepare a PLAYBACK urb for submission to the bus.
*/
Expand Down Expand Up @@ -361,6 +370,7 @@ static void snd_complete_urb(struct urb *urb)
goto exit_clear;
}

prepare_outbound_urb_sizes(ep, ctx);
prepare_outbound_urb(ep, ctx);
} else {
retire_inbound_urb(ep, ctx);
Expand Down Expand Up @@ -789,9 +799,7 @@ int snd_usb_endpoint_set_params(struct snd_usb_endpoint *ep,
/**
* snd_usb_endpoint_start: start an snd_usb_endpoint
*
* @ep: the endpoint to start
* @can_sleep: flag indicating whether the operation is executed in
* non-atomic context
* @ep: the endpoint to start
*
* A call to this function will increment the use count of the endpoint.
* In case it is not already running, the URBs for this endpoint will be
Expand All @@ -801,7 +809,7 @@ int snd_usb_endpoint_set_params(struct snd_usb_endpoint *ep,
*
* Returns an error if the URB submission failed, 0 in all other cases.
*/
int snd_usb_endpoint_start(struct snd_usb_endpoint *ep, int can_sleep)
int snd_usb_endpoint_start(struct snd_usb_endpoint *ep)
{
int err;
unsigned int i;
Expand All @@ -813,11 +821,6 @@ int snd_usb_endpoint_start(struct snd_usb_endpoint *ep, int can_sleep)
if (++ep->use_count != 1)
return 0;

/* just to be sure */
deactivate_urbs(ep, 0, can_sleep);
if (can_sleep)
wait_clear_urbs(ep);

ep->active_mask = 0;
ep->unlink_mask = 0;
ep->phase = 0;
Expand Down Expand Up @@ -847,6 +850,7 @@ int snd_usb_endpoint_start(struct snd_usb_endpoint *ep, int can_sleep)
goto __error;

if (usb_pipeout(ep->pipe)) {
prepare_outbound_urb_sizes(ep, urb->context);
prepare_outbound_urb(ep, urb->context);
} else {
prepare_inbound_urb(ep, urb->context);
Expand Down
3 changes: 1 addition & 2 deletions trunk/sound/usb/endpoint.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,14 @@ int snd_usb_endpoint_set_params(struct snd_usb_endpoint *ep,
struct audioformat *fmt,
struct snd_usb_endpoint *sync_ep);

int snd_usb_endpoint_start(struct snd_usb_endpoint *ep, int can_sleep);
int snd_usb_endpoint_start(struct snd_usb_endpoint *ep);
void snd_usb_endpoint_stop(struct snd_usb_endpoint *ep,
int force, int can_sleep, int wait);
int snd_usb_endpoint_activate(struct snd_usb_endpoint *ep);
int snd_usb_endpoint_deactivate(struct snd_usb_endpoint *ep);
void snd_usb_endpoint_free(struct list_head *head);

int snd_usb_endpoint_implict_feedback_sink(struct snd_usb_endpoint *ep);
int snd_usb_endpoint_next_packet_size(struct snd_usb_endpoint *ep);

void snd_usb_handle_sync_urb(struct snd_usb_endpoint *ep,
struct snd_usb_endpoint *sender,
Expand Down
Loading

0 comments on commit 3791275

Please sign in to comment.