diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/atm/he.c | 16 | ||||
-rw-r--r-- | drivers/char/rtc.c | 5 | ||||
-rw-r--r-- | drivers/media/video/videodev.c | 2 | ||||
-rw-r--r-- | drivers/net/sunlance.c | 10 | ||||
-rw-r--r-- | drivers/video/fbsysfs.c | 12 |
5 files changed, 29 insertions, 16 deletions
diff --git a/drivers/atm/he.c b/drivers/atm/he.c index 41e052fecd7f..f2511b42dba2 100644 --- a/drivers/atm/he.c +++ b/drivers/atm/he.c | |||
@@ -454,7 +454,7 @@ rate_to_atmf(unsigned rate) /* cps to atm forum format */ | |||
454 | return (NONZERO | (exp << 9) | (rate & 0x1ff)); | 454 | return (NONZERO | (exp << 9) | (rate & 0x1ff)); |
455 | } | 455 | } |
456 | 456 | ||
457 | static void __init | 457 | static void __devinit |
458 | he_init_rx_lbfp0(struct he_dev *he_dev) | 458 | he_init_rx_lbfp0(struct he_dev *he_dev) |
459 | { | 459 | { |
460 | unsigned i, lbm_offset, lbufd_index, lbuf_addr, lbuf_count; | 460 | unsigned i, lbm_offset, lbufd_index, lbuf_addr, lbuf_count; |
@@ -485,7 +485,7 @@ he_init_rx_lbfp0(struct he_dev *he_dev) | |||
485 | he_writel(he_dev, he_dev->r0_numbuffs, RLBF0_C); | 485 | he_writel(he_dev, he_dev->r0_numbuffs, RLBF0_C); |
486 | } | 486 | } |
487 | 487 | ||
488 | static void __init | 488 | static void __devinit |
489 | he_init_rx_lbfp1(struct he_dev *he_dev) | 489 | he_init_rx_lbfp1(struct he_dev *he_dev) |
490 | { | 490 | { |
491 | unsigned i, lbm_offset, lbufd_index, lbuf_addr, lbuf_count; | 491 | unsigned i, lbm_offset, lbufd_index, lbuf_addr, lbuf_count; |
@@ -516,7 +516,7 @@ he_init_rx_lbfp1(struct he_dev *he_dev) | |||
516 | he_writel(he_dev, he_dev->r1_numbuffs, RLBF1_C); | 516 | he_writel(he_dev, he_dev->r1_numbuffs, RLBF1_C); |
517 | } | 517 | } |
518 | 518 | ||
519 | static void __init | 519 | static void __devinit |
520 | he_init_tx_lbfp(struct he_dev *he_dev) | 520 | he_init_tx_lbfp(struct he_dev *he_dev) |
521 | { | 521 | { |
522 | unsigned i, lbm_offset, lbufd_index, lbuf_addr, lbuf_count; | 522 | unsigned i, lbm_offset, lbufd_index, lbuf_addr, lbuf_count; |
@@ -546,7 +546,7 @@ he_init_tx_lbfp(struct he_dev *he_dev) | |||
546 | he_writel(he_dev, lbufd_index - 1, TLBF_T); | 546 | he_writel(he_dev, lbufd_index - 1, TLBF_T); |
547 | } | 547 | } |
548 | 548 | ||
549 | static int __init | 549 | static int __devinit |
550 | he_init_tpdrq(struct he_dev *he_dev) | 550 | he_init_tpdrq(struct he_dev *he_dev) |
551 | { | 551 | { |
552 | he_dev->tpdrq_base = pci_alloc_consistent(he_dev->pci_dev, | 552 | he_dev->tpdrq_base = pci_alloc_consistent(he_dev->pci_dev, |
@@ -568,7 +568,7 @@ he_init_tpdrq(struct he_dev *he_dev) | |||
568 | return 0; | 568 | return 0; |
569 | } | 569 | } |
570 | 570 | ||
571 | static void __init | 571 | static void __devinit |
572 | he_init_cs_block(struct he_dev *he_dev) | 572 | he_init_cs_block(struct he_dev *he_dev) |
573 | { | 573 | { |
574 | unsigned clock, rate, delta; | 574 | unsigned clock, rate, delta; |
@@ -664,7 +664,7 @@ he_init_cs_block(struct he_dev *he_dev) | |||
664 | 664 | ||
665 | } | 665 | } |
666 | 666 | ||
667 | static int __init | 667 | static int __devinit |
668 | he_init_cs_block_rcm(struct he_dev *he_dev) | 668 | he_init_cs_block_rcm(struct he_dev *he_dev) |
669 | { | 669 | { |
670 | unsigned (*rategrid)[16][16]; | 670 | unsigned (*rategrid)[16][16]; |
@@ -785,7 +785,7 @@ he_init_cs_block_rcm(struct he_dev *he_dev) | |||
785 | return 0; | 785 | return 0; |
786 | } | 786 | } |
787 | 787 | ||
788 | static int __init | 788 | static int __devinit |
789 | he_init_group(struct he_dev *he_dev, int group) | 789 | he_init_group(struct he_dev *he_dev, int group) |
790 | { | 790 | { |
791 | int i; | 791 | int i; |
@@ -955,7 +955,7 @@ he_init_group(struct he_dev *he_dev, int group) | |||
955 | return 0; | 955 | return 0; |
956 | } | 956 | } |
957 | 957 | ||
958 | static int __init | 958 | static int __devinit |
959 | he_init_irq(struct he_dev *he_dev) | 959 | he_init_irq(struct he_dev *he_dev) |
960 | { | 960 | { |
961 | int i; | 961 | int i; |
diff --git a/drivers/char/rtc.c b/drivers/char/rtc.c index 6e6a7c7a7eff..ab6429b4a84e 100644 --- a/drivers/char/rtc.c +++ b/drivers/char/rtc.c | |||
@@ -209,11 +209,12 @@ static const unsigned char days_in_mo[] = | |||
209 | */ | 209 | */ |
210 | static inline unsigned char rtc_is_updating(void) | 210 | static inline unsigned char rtc_is_updating(void) |
211 | { | 211 | { |
212 | unsigned long flags; | ||
212 | unsigned char uip; | 213 | unsigned char uip; |
213 | 214 | ||
214 | spin_lock_irq(&rtc_lock); | 215 | spin_lock_irqsave(&rtc_lock, flags); |
215 | uip = (CMOS_READ(RTC_FREQ_SELECT) & RTC_UIP); | 216 | uip = (CMOS_READ(RTC_FREQ_SELECT) & RTC_UIP); |
216 | spin_unlock_irq(&rtc_lock); | 217 | spin_unlock_irqrestore(&rtc_lock, flags); |
217 | return uip; | 218 | return uip; |
218 | } | 219 | } |
219 | 220 | ||
diff --git a/drivers/media/video/videodev.c b/drivers/media/video/videodev.c index 88bf2af2a0e7..edd7b83c3464 100644 --- a/drivers/media/video/videodev.c +++ b/drivers/media/video/videodev.c | |||
@@ -836,7 +836,7 @@ static int __video_do_ioctl(struct inode *inode, struct file *file, | |||
836 | break; | 836 | break; |
837 | } | 837 | } |
838 | 838 | ||
839 | if (index<=0 || index >= vfd->tvnormsize) { | 839 | if (index < 0 || index >= vfd->tvnormsize) { |
840 | ret=-EINVAL; | 840 | ret=-EINVAL; |
841 | break; | 841 | break; |
842 | } | 842 | } |
diff --git a/drivers/net/sunlance.c b/drivers/net/sunlance.c index 77670741e101..feb42db10ee1 100644 --- a/drivers/net/sunlance.c +++ b/drivers/net/sunlance.c | |||
@@ -1323,9 +1323,9 @@ static const struct ethtool_ops sparc_lance_ethtool_ops = { | |||
1323 | .get_link = sparc_lance_get_link, | 1323 | .get_link = sparc_lance_get_link, |
1324 | }; | 1324 | }; |
1325 | 1325 | ||
1326 | static int __init sparc_lance_probe_one(struct sbus_dev *sdev, | 1326 | static int __devinit sparc_lance_probe_one(struct sbus_dev *sdev, |
1327 | struct sbus_dma *ledma, | 1327 | struct sbus_dma *ledma, |
1328 | struct sbus_dev *lebuffer) | 1328 | struct sbus_dev *lebuffer) |
1329 | { | 1329 | { |
1330 | static unsigned version_printed; | 1330 | static unsigned version_printed; |
1331 | struct net_device *dev; | 1331 | struct net_device *dev; |
@@ -1515,7 +1515,7 @@ fail: | |||
1515 | } | 1515 | } |
1516 | 1516 | ||
1517 | /* On 4m, find the associated dma for the lance chip */ | 1517 | /* On 4m, find the associated dma for the lance chip */ |
1518 | static inline struct sbus_dma *find_ledma(struct sbus_dev *sdev) | 1518 | static struct sbus_dma * __devinit find_ledma(struct sbus_dev *sdev) |
1519 | { | 1519 | { |
1520 | struct sbus_dma *p; | 1520 | struct sbus_dma *p; |
1521 | 1521 | ||
@@ -1533,7 +1533,7 @@ static inline struct sbus_dma *find_ledma(struct sbus_dev *sdev) | |||
1533 | 1533 | ||
1534 | /* Find all the lance cards on the system and initialize them */ | 1534 | /* Find all the lance cards on the system and initialize them */ |
1535 | static struct sbus_dev sun4_sdev; | 1535 | static struct sbus_dev sun4_sdev; |
1536 | static int __init sparc_lance_init(void) | 1536 | static int __devinit sparc_lance_init(void) |
1537 | { | 1537 | { |
1538 | if ((idprom->id_machtype == (SM_SUN4|SM_4_330)) || | 1538 | if ((idprom->id_machtype == (SM_SUN4|SM_4_330)) || |
1539 | (idprom->id_machtype == (SM_SUN4|SM_4_470))) { | 1539 | (idprom->id_machtype == (SM_SUN4|SM_4_470))) { |
diff --git a/drivers/video/fbsysfs.c b/drivers/video/fbsysfs.c index 4f78f234473d..c151dcf68786 100644 --- a/drivers/video/fbsysfs.c +++ b/drivers/video/fbsysfs.c | |||
@@ -397,6 +397,12 @@ static ssize_t store_bl_curve(struct class_device *class_device, | |||
397 | u8 tmp_curve[FB_BACKLIGHT_LEVELS]; | 397 | u8 tmp_curve[FB_BACKLIGHT_LEVELS]; |
398 | unsigned int i; | 398 | unsigned int i; |
399 | 399 | ||
400 | /* Some drivers don't use framebuffer_alloc(), but those also | ||
401 | * don't have backlights. | ||
402 | */ | ||
403 | if (!fb_info || !fb_info->bl_dev) | ||
404 | return -ENODEV; | ||
405 | |||
400 | if (count != (FB_BACKLIGHT_LEVELS / 8 * 24)) | 406 | if (count != (FB_BACKLIGHT_LEVELS / 8 * 24)) |
401 | return -EINVAL; | 407 | return -EINVAL; |
402 | 408 | ||
@@ -430,6 +436,12 @@ static ssize_t show_bl_curve(struct class_device *class_device, char *buf) | |||
430 | ssize_t len = 0; | 436 | ssize_t len = 0; |
431 | unsigned int i; | 437 | unsigned int i; |
432 | 438 | ||
439 | /* Some drivers don't use framebuffer_alloc(), but those also | ||
440 | * don't have backlights. | ||
441 | */ | ||
442 | if (!fb_info || !fb_info->bl_dev) | ||
443 | return -ENODEV; | ||
444 | |||
433 | mutex_lock(&fb_info->bl_mutex); | 445 | mutex_lock(&fb_info->bl_mutex); |
434 | for (i = 0; i < FB_BACKLIGHT_LEVELS; i += 8) | 446 | for (i = 0; i < FB_BACKLIGHT_LEVELS; i += 8) |
435 | len += snprintf(&buf[len], PAGE_SIZE, | 447 | len += snprintf(&buf[len], PAGE_SIZE, |