Commit f8fa11b2 authored by Randy Dunlap's avatar Randy Dunlap Committed by Linus Torvalds

[PATCH] janitor: remove bogus locking

From: Domen Puncer <domen@coderock.org>

Matthew Wilcox wrote:
>
> This routine looks to be bogus to begin with.  i'd just remove the
> save_flags, cli and restore_flags calls entirely.
parent cfc7fe00
...@@ -2030,7 +2030,6 @@ static int init_planb(struct planb *pb) ...@@ -2030,7 +2030,6 @@ static int init_planb(struct planb *pb)
{ {
unsigned char saa_rev; unsigned char saa_rev;
int i, result; int i, result;
unsigned long flags;
memset ((void *) &pb->win, 0, sizeof (struct planb_window)); memset ((void *) &pb->win, 0, sizeof (struct planb_window));
/* Simple sanity check */ /* Simple sanity check */
...@@ -2096,7 +2095,6 @@ static int init_planb(struct planb *pb) ...@@ -2096,7 +2095,6 @@ static int init_planb(struct planb *pb)
/* clear interrupt mask */ /* clear interrupt mask */
pb->intr_mask = PLANB_CLR_IRQ; pb->intr_mask = PLANB_CLR_IRQ;
save_flags(flags); cli();
result = request_irq(pb->irq, planb_irq, 0, "PlanB", (void *)pb); result = request_irq(pb->irq, planb_irq, 0, "PlanB", (void *)pb);
if (result < 0) { if (result < 0) {
if (result==-EINVAL) if (result==-EINVAL)
...@@ -2105,11 +2103,9 @@ static int init_planb(struct planb *pb) ...@@ -2105,11 +2103,9 @@ static int init_planb(struct planb *pb)
else if (result==-EBUSY) else if (result==-EBUSY)
printk(KERN_ERR "PlanB: I don't know why, " printk(KERN_ERR "PlanB: I don't know why, "
"but IRQ %d is busy\n", (int)pb->irq); "but IRQ %d is busy\n", (int)pb->irq);
restore_flags(flags);
return result; return result;
} }
disable_irq(pb->irq); disable_irq(pb->irq);
restore_flags(flags);
/* Now add the template and register the device unit. */ /* Now add the template and register the device unit. */
memcpy(&pb->video_dev,&planb_template,sizeof(planb_template)); memcpy(&pb->video_dev,&planb_template,sizeof(planb_template));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment