Commit 050bfcfe authored by Russell King's avatar Russell King

Remove some uses of depreciated save_flags_cli() in favour of the more

generic local_irq_save() where appropriate.  (None of these are ever
going to be used on a SMP ARM machine).
parent 452d9392
...@@ -28,7 +28,7 @@ void adsbitsy_leds_event(led_event_t evt) ...@@ -28,7 +28,7 @@ void adsbitsy_leds_event(led_event_t evt)
{ {
unsigned long flags; unsigned long flags;
save_flags_cli(flags); local_irq_save(flags);
switch (evt) { switch (evt) {
case led_start: case led_start:
...@@ -92,5 +92,5 @@ void adsbitsy_leds_event(led_event_t evt) ...@@ -92,5 +92,5 @@ void adsbitsy_leds_event(led_event_t evt)
GPCR = hw_led_state ^ LED_MASK; GPCR = hw_led_state ^ LED_MASK;
} }
restore_flags(flags); local_irq_restore(flags);
} }
...@@ -30,7 +30,7 @@ void graphicsclient_leds_event(led_event_t evt) ...@@ -30,7 +30,7 @@ void graphicsclient_leds_event(led_event_t evt)
{ {
unsigned long flags; unsigned long flags;
save_flags_cli(flags); local_irq_save(flags);
switch (evt) { switch (evt) {
case led_start: case led_start:
...@@ -100,5 +100,5 @@ void graphicsclient_leds_event(led_event_t evt) ...@@ -100,5 +100,5 @@ void graphicsclient_leds_event(led_event_t evt)
GPCR = hw_led_state ^ LED_MASK; GPCR = hw_led_state ^ LED_MASK;
} }
restore_flags(flags); local_irq_restore(flags);
} }
...@@ -30,7 +30,7 @@ void graphicsmaster_leds_event(led_event_t evt) ...@@ -30,7 +30,7 @@ void graphicsmaster_leds_event(led_event_t evt)
{ {
unsigned long flags; unsigned long flags;
save_flags_cli(flags); local_irq_save(flags);
switch (evt) { switch (evt) {
case led_start: case led_start:
...@@ -100,5 +100,5 @@ void graphicsmaster_leds_event(led_event_t evt) ...@@ -100,5 +100,5 @@ void graphicsmaster_leds_event(led_event_t evt)
GPCR = hw_led_state ^ LED_MASK; GPCR = hw_led_state ^ LED_MASK;
} }
restore_flags(flags); local_irq_restore(flags);
} }
...@@ -321,14 +321,14 @@ static void console_printf(const char *fmt,...) ...@@ -321,14 +321,14 @@ static void console_printf(const char *fmt,...)
unsigned long flags; unsigned long flags;
va_list ap; va_list ap;
save_flags_cli(flags); local_irq_save(flags);
va_start(ap, fmt); va_start(ap, fmt);
vsprintf(buffer, fmt, ap); vsprintf(buffer, fmt, ap);
console_print(buffer); console_print(buffer);
va_end(fmt); va_end(fmt);
restore_flags(flags); local_irq_restore(flags);
}; /* console_printf */ }; /* console_printf */
#define DBG(x...) console_printf(x) #define DBG(x...) console_printf(x)
...@@ -1451,13 +1451,13 @@ static int mfm_reread_partitions(kdev_t dev) ...@@ -1451,13 +1451,13 @@ static int mfm_reread_partitions(kdev_t dev)
unsigned int start, i, maxp, target = DEVICE_NR(MINOR(dev)); unsigned int start, i, maxp, target = DEVICE_NR(MINOR(dev));
unsigned long flags; unsigned long flags;
save_flags_cli(flags); local_irq_save(flags);
if (mfm_info[target].busy || mfm_info[target].access_count > 1) { if (mfm_info[target].busy || mfm_info[target].access_count > 1) {
restore_flags (flags); local_irq_restore (flags);
return -EBUSY; return -EBUSY;
} }
mfm_info[target].busy = 1; mfm_info[target].busy = 1;
restore_flags (flags); local_irq_restore (flags);
maxp = 1 << mfm_gendisk.minor_shift; maxp = 1 << mfm_gendisk.minor_shift;
start = target << mfm_gendisk.minor_shift; start = target << mfm_gendisk.minor_shift;
......
...@@ -99,13 +99,13 @@ ether1_inw_p (struct net_device *dev, int addr, int svflgs) ...@@ -99,13 +99,13 @@ ether1_inw_p (struct net_device *dev, int addr, int svflgs)
unsigned long flags; unsigned long flags;
unsigned short ret; unsigned short ret;
if (svflgs) { if (svflgs)
save_flags_cli (flags); local_irq_save (flags);
}
outb (addr >> 12, REG_PAGE); outb (addr >> 12, REG_PAGE);
ret = inw (ETHER1_RAM + ((addr & 4095) >> 1)); ret = inw (ETHER1_RAM + ((addr & 4095) >> 1));
if (svflgs) if (svflgs)
restore_flags (flags); local_irq_restore (flags);
return ret; return ret;
} }
...@@ -114,13 +114,13 @@ ether1_outw_p (struct net_device *dev, unsigned short val, int addr, int svflgs) ...@@ -114,13 +114,13 @@ ether1_outw_p (struct net_device *dev, unsigned short val, int addr, int svflgs)
{ {
unsigned long flags; unsigned long flags;
if (svflgs) { if (svflgs)
save_flags_cli (flags); local_irq_save (flags);
}
outb (addr >> 12, REG_PAGE); outb (addr >> 12, REG_PAGE);
outw (val, ETHER1_RAM + ((addr & 4095) >> 1)); outw (val, ETHER1_RAM + ((addr & 4095) >> 1));
if (svflgs) if (svflgs)
restore_flags (flags); local_irq_restore (flags);
} }
/* /*
...@@ -722,7 +722,7 @@ ether1_sendpacket (struct sk_buff *skb, struct net_device *dev) ...@@ -722,7 +722,7 @@ ether1_sendpacket (struct sk_buff *skb, struct net_device *dev)
nop.nop_command = CMD_NOP; nop.nop_command = CMD_NOP;
nop.nop_link = nopaddr; nop.nop_link = nopaddr;
save_flags_cli(flags); local_irq_save(flags);
ether1_writebuffer (dev, &tx, txaddr, TX_SIZE); ether1_writebuffer (dev, &tx, txaddr, TX_SIZE);
ether1_writebuffer (dev, &tbd, tbdaddr, TBD_SIZE); ether1_writebuffer (dev, &tbd, tbdaddr, TBD_SIZE);
ether1_writebuffer (dev, skb->data, dataddr, len); ether1_writebuffer (dev, skb->data, dataddr, len);
...@@ -733,7 +733,7 @@ ether1_sendpacket (struct sk_buff *skb, struct net_device *dev) ...@@ -733,7 +733,7 @@ ether1_sendpacket (struct sk_buff *skb, struct net_device *dev)
/* now reset the previous nop pointer */ /* now reset the previous nop pointer */
ether1_outw (dev, txaddr, tmp, nop_t, nop_link, NORMALIRQS); ether1_outw (dev, txaddr, tmp, nop_t, nop_link, NORMALIRQS);
restore_flags(flags); local_irq_restore(flags);
/* handle transmit */ /* handle transmit */
dev->trans_start = jiffies; dev->trans_start = jiffies;
......
...@@ -491,7 +491,7 @@ ether3_timeout(struct net_device *dev) ...@@ -491,7 +491,7 @@ ether3_timeout(struct net_device *dev)
del_timer(&priv->timer); del_timer(&priv->timer);
save_flags_cli(flags); local_irq_save(flags);
printk(KERN_ERR "%s: transmit timed out, network cable problem?\n", dev->name); printk(KERN_ERR "%s: transmit timed out, network cable problem?\n", dev->name);
printk(KERN_ERR "%s: state: { status=%04X cfg1=%04X cfg2=%04X }\n", dev->name, printk(KERN_ERR "%s: state: { status=%04X cfg1=%04X cfg2=%04X }\n", dev->name,
ether3_inw(REG_STATUS), ether3_inw(REG_CONFIG1), ether3_inw(REG_CONFIG2)); ether3_inw(REG_STATUS), ether3_inw(REG_CONFIG1), ether3_inw(REG_CONFIG2));
...@@ -501,7 +501,7 @@ ether3_timeout(struct net_device *dev) ...@@ -501,7 +501,7 @@ ether3_timeout(struct net_device *dev)
priv->tx_head, priv->tx_tail); priv->tx_head, priv->tx_tail);
ether3_setbuffer(dev, buffer_read, priv->tx_tail); ether3_setbuffer(dev, buffer_read, priv->tx_tail);
printk(KERN_ERR "%s: packet status = %08X\n", dev->name, ether3_readlong(dev)); printk(KERN_ERR "%s: packet status = %08X\n", dev->name, ether3_readlong(dev));
restore_flags(flags); local_irq_restore(flags);
priv->regs.config2 |= CFG2_CTRLO; priv->regs.config2 |= CFG2_CTRLO;
priv->stats.tx_errors += 1; priv->stats.tx_errors += 1;
...@@ -533,10 +533,10 @@ ether3_sendpacket(struct sk_buff *skb, struct net_device *dev) ...@@ -533,10 +533,10 @@ ether3_sendpacket(struct sk_buff *skb, struct net_device *dev)
next_ptr = (priv->tx_head + 1) & 15; next_ptr = (priv->tx_head + 1) & 15;
save_flags_cli(flags); local_irq_save(flags);
if (priv->tx_tail == next_ptr) { if (priv->tx_tail == next_ptr) {
restore_flags(flags); local_irq_restore(flags);
return 1; /* unable to queue */ return 1; /* unable to queue */
} }
...@@ -565,7 +565,7 @@ ether3_sendpacket(struct sk_buff *skb, struct net_device *dev) ...@@ -565,7 +565,7 @@ ether3_sendpacket(struct sk_buff *skb, struct net_device *dev)
} }
next_ptr = (priv->tx_head + 1) & 15; next_ptr = (priv->tx_head + 1) & 15;
restore_flags(flags); local_irq_restore(flags);
dev_kfree_skb(skb); dev_kfree_skb(skb);
......
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