Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 233955
b: refs/heads/master
c: ef1b287
h: refs/heads/master
i:
  233953: 639f167
  233951: bd137ce
v: v3
  • Loading branch information
Ben Skeggs authored and Dave Airlie committed Mar 7, 2011
1 parent b1320d5 commit b1667fe
Show file tree
Hide file tree
Showing 16 changed files with 80 additions and 210 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: 214d93b02c4fe93638ad268613c9702a81ed9192
refs/heads/master: ef1b287169cd3d1e428c8ed8222e0bbf733d5dbb
10 changes: 4 additions & 6 deletions trunk/arch/arm/mach-omap2/mailbox.c
Original file line number Diff line number Diff line change
Expand Up @@ -193,12 +193,10 @@ static void omap2_mbox_disable_irq(struct omap_mbox *mbox,
omap_mbox_type_t irq)
{
struct omap_mbox2_priv *p = mbox->priv;
u32 bit = (irq == IRQ_TX) ? p->notfull_bit : p->newmsg_bit;

if (!cpu_is_omap44xx())
bit = mbox_read_reg(p->irqdisable) & ~bit;

mbox_write_reg(bit, p->irqdisable);
u32 l, bit = (irq == IRQ_TX) ? p->notfull_bit : p->newmsg_bit;
l = mbox_read_reg(p->irqdisable);
l &= ~bit;
mbox_write_reg(l, p->irqdisable);
}

static void omap2_mbox_ack_irq(struct omap_mbox *mbox,
Expand Down
33 changes: 18 additions & 15 deletions trunk/arch/arm/mach-omap2/smartreflex.c
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,6 @@ static int sr_late_init(struct omap_sr *sr_info)
dev_err(&sr_info->pdev->dev, "%s: ERROR in registering"
"interrupt handler. Smartreflex will"
"not function as desired\n", __func__);
kfree(name);
kfree(sr_info);
return ret;
}
Expand Down Expand Up @@ -880,7 +879,7 @@ static int __init omap_sr_probe(struct platform_device *pdev)
ret = sr_late_init(sr_info);
if (ret) {
pr_warning("%s: Error in SR late init\n", __func__);
goto err_release_region;
return ret;
}
}

Expand All @@ -891,17 +890,14 @@ static int __init omap_sr_probe(struct platform_device *pdev)
* not try to create rest of the debugfs entries.
*/
vdd_dbg_dir = omap_voltage_get_dbgdir(sr_info->voltdm);
if (!vdd_dbg_dir) {
ret = -EINVAL;
goto err_release_region;
}
if (!vdd_dbg_dir)
return -EINVAL;

dbg_dir = debugfs_create_dir("smartreflex", vdd_dbg_dir);
if (IS_ERR(dbg_dir)) {
dev_err(&pdev->dev, "%s: Unable to create debugfs directory\n",
__func__);
ret = PTR_ERR(dbg_dir);
goto err_release_region;
return PTR_ERR(dbg_dir);
}

(void) debugfs_create_file("autocomp", S_IRUGO | S_IWUSR, dbg_dir,
Expand All @@ -917,8 +913,7 @@ static int __init omap_sr_probe(struct platform_device *pdev)
if (IS_ERR(nvalue_dir)) {
dev_err(&pdev->dev, "%s: Unable to create debugfs directory"
"for n-values\n", __func__);
ret = PTR_ERR(nvalue_dir);
goto err_release_region;
return PTR_ERR(nvalue_dir);
}

omap_voltage_get_volttable(sr_info->voltdm, &volt_data);
Expand All @@ -927,15 +922,23 @@ static int __init omap_sr_probe(struct platform_device *pdev)
" corresponding vdd vdd_%s. Cannot create debugfs"
"entries for n-values\n",
__func__, sr_info->voltdm->name);
ret = -ENODATA;
goto err_release_region;
return -ENODATA;
}

for (i = 0; i < sr_info->nvalue_count; i++) {
char name[NVALUE_NAME_LEN + 1];
char *name;
char volt_name[32];

name = kzalloc(NVALUE_NAME_LEN + 1, GFP_KERNEL);
if (!name) {
dev_err(&pdev->dev, "%s: Unable to allocate memory"
" for n-value directory name\n", __func__);
return -ENOMEM;
}

snprintf(name, sizeof(name), "volt_%d",
volt_data[i].volt_nominal);
strcpy(name, "volt_");
sprintf(volt_name, "%d", volt_data[i].volt_nominal);
strcat(name, volt_name);
(void) debugfs_create_x32(name, S_IRUGO | S_IWUSR, nvalue_dir,
&(sr_info->nvalue_table[i].nvalue));
}
Expand Down
8 changes: 0 additions & 8 deletions trunk/drivers/char/virtio_console.c
Original file line number Diff line number Diff line change
Expand Up @@ -388,10 +388,6 @@ static void discard_port_data(struct port *port)
unsigned int len;
int ret;

if (!port->portdev) {
/* Device has been unplugged. vqs are already gone. */
return;
}
vq = port->in_vq;
if (port->inbuf)
buf = port->inbuf;
Expand Down Expand Up @@ -474,10 +470,6 @@ static void reclaim_consumed_buffers(struct port *port)
void *buf;
unsigned int len;

if (!port->portdev) {
/* Device has been unplugged. vqs are already gone. */
return;
}
while ((buf = virtqueue_get_buf(port->out_vq, &len))) {
kfree(buf);
port->outvq_full = false;
Expand Down
6 changes: 4 additions & 2 deletions trunk/drivers/gpu/drm/nouveau/nouveau_mem.c
Original file line number Diff line number Diff line change
Expand Up @@ -725,8 +725,10 @@ nouveau_vram_manager_new(struct ttm_mem_type_manager *man,
ret = vram->get(dev, mem->num_pages << PAGE_SHIFT,
mem->page_alignment << PAGE_SHIFT, size_nc,
(nvbo->tile_flags >> 8) & 0xff, &node);
if (ret)
return ret;
if (ret) {
mem->mm_node = NULL;
return (ret == -ENOSPC) ? 0 : ret;
}

node->page_shift = 12;
if (nvbo->vma.node)
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/gpu/drm/nouveau/nouveau_mm.c
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ nouveau_mm_get(struct nouveau_mm *rmm, int type, u32 size, u32 size_nc,
return 0;
}

return -ENOMEM;
return -ENOSPC;
}

int
Expand Down
4 changes: 2 additions & 2 deletions trunk/drivers/s390/block/xpram.c
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,8 @@ static int xpram_devs;
/*
* Parameter parsing functions.
*/
static int devs = XPRAM_DEVS;
static char *sizes[XPRAM_MAX_DEVS];
static int __initdata devs = XPRAM_DEVS;
static char __initdata *sizes[XPRAM_MAX_DEVS];

module_param(devs, int, 0);
module_param_array(sizes, charp, NULL, 0);
Expand Down
3 changes: 1 addition & 2 deletions trunk/drivers/s390/char/keyboard.c
Original file line number Diff line number Diff line change
Expand Up @@ -460,8 +460,7 @@ kbd_ioctl(struct kbd_data *kbd, struct file *file,
unsigned int cmd, unsigned long arg)
{
void __user *argp;
unsigned int ct;
int perm;
int ct, perm;

argp = (void __user *)arg;

Expand Down
8 changes: 0 additions & 8 deletions trunk/drivers/s390/char/tape.h
Original file line number Diff line number Diff line change
Expand Up @@ -280,14 +280,6 @@ tape_do_io_free(struct tape_device *device, struct tape_request *request)
return rc;
}

static inline void
tape_do_io_async_free(struct tape_device *device, struct tape_request *request)
{
request->callback = (void *) tape_free_request;
request->callback_data = NULL;
tape_do_io_async(device, request);
}

extern int tape_oper_handler(int irq, int status);
extern void tape_noper_handler(int irq, int status);
extern int tape_open(struct tape_device *);
Expand Down
59 changes: 18 additions & 41 deletions trunk/drivers/s390/char/tape_34xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,23 @@ static void tape_34xx_delete_sbid_from(struct tape_device *, int);
* Medium sense for 34xx tapes. There is no 'real' medium sense call.
* So we just do a normal sense.
*/
static void __tape_34xx_medium_sense(struct tape_request *request)
static int
tape_34xx_medium_sense(struct tape_device *device)
{
struct tape_device *device = request->device;
unsigned char *sense;
struct tape_request *request;
unsigned char *sense;
int rc;

request = tape_alloc_request(1, 32);
if (IS_ERR(request)) {
DBF_EXCEPTION(6, "MSEN fail\n");
return PTR_ERR(request);
}

request->op = TO_MSEN;
tape_ccw_end(request->cpaddr, SENSE, 32, request->cpdata);

rc = tape_do_io_interruptible(device, request);
if (request->rc == 0) {
sense = request->cpdata;

Expand All @@ -76,47 +88,15 @@ static void __tape_34xx_medium_sense(struct tape_request *request)
device->tape_generic_status |= GMT_WR_PROT(~0);
else
device->tape_generic_status &= ~GMT_WR_PROT(~0);
} else
} else {
DBF_EVENT(4, "tape_34xx: medium sense failed with rc=%d\n",
request->rc);
tape_free_request(request);
}

static int tape_34xx_medium_sense(struct tape_device *device)
{
struct tape_request *request;
int rc;

request = tape_alloc_request(1, 32);
if (IS_ERR(request)) {
DBF_EXCEPTION(6, "MSEN fail\n");
return PTR_ERR(request);
}
tape_free_request(request);

request->op = TO_MSEN;
tape_ccw_end(request->cpaddr, SENSE, 32, request->cpdata);
rc = tape_do_io_interruptible(device, request);
__tape_34xx_medium_sense(request);
return rc;
}

static void tape_34xx_medium_sense_async(struct tape_device *device)
{
struct tape_request *request;

request = tape_alloc_request(1, 32);
if (IS_ERR(request)) {
DBF_EXCEPTION(6, "MSEN fail\n");
return;
}

request->op = TO_MSEN;
tape_ccw_end(request->cpaddr, SENSE, 32, request->cpdata);
request->callback = (void *) __tape_34xx_medium_sense;
request->callback_data = NULL;
tape_do_io_async(device, request);
}

struct tape_34xx_work {
struct tape_device *device;
enum tape_op op;
Expand All @@ -129,9 +109,6 @@ struct tape_34xx_work {
* is inserted but cannot call tape_do_io* from an interrupt context.
* Maybe that's useful for other actions we want to start from the
* interrupt handler.
* Note: the work handler is called by the system work queue. The tape
* commands started by the handler need to be asynchrounous, otherwise
* a deadlock can occur e.g. in case of a deferred cc=1 (see __tape_do_irq).
*/
static void
tape_34xx_work_handler(struct work_struct *work)
Expand All @@ -142,7 +119,7 @@ tape_34xx_work_handler(struct work_struct *work)

switch(p->op) {
case TO_MSEN:
tape_34xx_medium_sense_async(device);
tape_34xx_medium_sense(device);
break;
default:
DBF_EVENT(3, "T34XX: internal error: unknown work\n");
Expand Down
Loading

0 comments on commit b1667fe

Please sign in to comment.