aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/ata/pata_pdc2027x.c6
-rw-r--r--drivers/char/rtc.c5
-rw-r--r--drivers/media/video/videodev.c2
-rw-r--r--drivers/net/qla3xxx.c49
-rw-r--r--drivers/net/qla3xxx.h2
-rw-r--r--drivers/net/sunlance.c10
-rw-r--r--drivers/scsi/aic94xx/aic94xx.h2
-rw-r--r--drivers/scsi/aic94xx/aic94xx_hwi.c8
-rw-r--r--drivers/scsi/aic94xx/aic94xx_hwi.h6
-rw-r--r--drivers/scsi/aic94xx/aic94xx_seq.c2
-rw-r--r--drivers/scsi/aic94xx/aic94xx_task.c10
-rw-r--r--drivers/scsi/libsas/sas_scsi_host.c2
-rw-r--r--drivers/scsi/scsi.c16
-rw-r--r--drivers/video/fbsysfs.c12
14 files changed, 74 insertions, 58 deletions
diff --git a/drivers/ata/pata_pdc2027x.c b/drivers/ata/pata_pdc2027x.c
index 56b8c1ee2937..31ab9c886209 100644
--- a/drivers/ata/pata_pdc2027x.c
+++ b/drivers/ata/pata_pdc2027x.c
@@ -242,7 +242,7 @@ MODULE_DEVICE_TABLE(pci, pdc2027x_pci_tbl);
242 * @ap: Port 242 * @ap: Port
243 * @offset: offset from mmio base 243 * @offset: offset from mmio base
244 */ 244 */
245static inline void* port_mmio(struct ata_port *ap, unsigned int offset) 245static inline void __iomem *port_mmio(struct ata_port *ap, unsigned int offset)
246{ 246{
247 return ap->host->mmio_base + ap->port_no * 0x100 + offset; 247 return ap->host->mmio_base + ap->port_no * 0x100 + offset;
248} 248}
@@ -253,7 +253,7 @@ static inline void* port_mmio(struct ata_port *ap, unsigned int offset)
253 * @adev: device 253 * @adev: device
254 * @offset: offset from mmio base 254 * @offset: offset from mmio base
255 */ 255 */
256static inline void* dev_mmio(struct ata_port *ap, struct ata_device *adev, unsigned int offset) 256static inline void __iomem *dev_mmio(struct ata_port *ap, struct ata_device *adev, unsigned int offset)
257{ 257{
258 u8 adj = (adev->devno) ? 0x08 : 0x00; 258 u8 adj = (adev->devno) ? 0x08 : 0x00;
259 return port_mmio(ap, offset) + adj; 259 return port_mmio(ap, offset) + adj;
@@ -758,7 +758,7 @@ static int __devinit pdc2027x_init_one(struct pci_dev *pdev, const struct pci_de
758 758
759 struct ata_probe_ent *probe_ent = NULL; 759 struct ata_probe_ent *probe_ent = NULL;
760 unsigned long base; 760 unsigned long base;
761 void *mmio_base; 761 void __iomem *mmio_base;
762 int rc; 762 int rc;
763 763
764 if (!printed_version++) 764 if (!printed_version++)
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 */
210static inline unsigned char rtc_is_updating(void) 210static 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/qla3xxx.c b/drivers/net/qla3xxx.c
index 09a481a71838..157471846349 100644
--- a/drivers/net/qla3xxx.c
+++ b/drivers/net/qla3xxx.c
@@ -189,31 +189,31 @@ static u32 ql_read_page0_reg(struct ql3_adapter *qdev, u32 __iomem *reg)
189} 189}
190 190
191static void ql_write_common_reg_l(struct ql3_adapter *qdev, 191static void ql_write_common_reg_l(struct ql3_adapter *qdev,
192 u32 * reg, u32 value) 192 u32 __iomem *reg, u32 value)
193{ 193{
194 unsigned long hw_flags; 194 unsigned long hw_flags;
195 195
196 spin_lock_irqsave(&qdev->hw_lock, hw_flags); 196 spin_lock_irqsave(&qdev->hw_lock, hw_flags);
197 writel(value, (u32 *) reg); 197 writel(value, reg);
198 readl(reg); 198 readl(reg);
199 spin_unlock_irqrestore(&qdev->hw_lock, hw_flags); 199 spin_unlock_irqrestore(&qdev->hw_lock, hw_flags);
200 return; 200 return;
201} 201}
202 202
203static void ql_write_common_reg(struct ql3_adapter *qdev, 203static void ql_write_common_reg(struct ql3_adapter *qdev,
204 u32 * reg, u32 value) 204 u32 __iomem *reg, u32 value)
205{ 205{
206 writel(value, (u32 *) reg); 206 writel(value, reg);
207 readl(reg); 207 readl(reg);
208 return; 208 return;
209} 209}
210 210
211static void ql_write_page0_reg(struct ql3_adapter *qdev, 211static void ql_write_page0_reg(struct ql3_adapter *qdev,
212 u32 * reg, u32 value) 212 u32 __iomem *reg, u32 value)
213{ 213{
214 if (qdev->current_page != 0) 214 if (qdev->current_page != 0)
215 ql_set_register_page(qdev,0); 215 ql_set_register_page(qdev,0);
216 writel(value, (u32 *) reg); 216 writel(value, reg);
217 readl(reg); 217 readl(reg);
218 return; 218 return;
219} 219}
@@ -222,11 +222,11 @@ static void ql_write_page0_reg(struct ql3_adapter *qdev,
222 * Caller holds hw_lock. Only called during init. 222 * Caller holds hw_lock. Only called during init.
223 */ 223 */
224static void ql_write_page1_reg(struct ql3_adapter *qdev, 224static void ql_write_page1_reg(struct ql3_adapter *qdev,
225 u32 * reg, u32 value) 225 u32 __iomem *reg, u32 value)
226{ 226{
227 if (qdev->current_page != 1) 227 if (qdev->current_page != 1)
228 ql_set_register_page(qdev,1); 228 ql_set_register_page(qdev,1);
229 writel(value, (u32 *) reg); 229 writel(value, reg);
230 readl(reg); 230 readl(reg);
231 return; 231 return;
232} 232}
@@ -235,11 +235,11 @@ static void ql_write_page1_reg(struct ql3_adapter *qdev,
235 * Caller holds hw_lock. Only called during init. 235 * Caller holds hw_lock. Only called during init.
236 */ 236 */
237static void ql_write_page2_reg(struct ql3_adapter *qdev, 237static void ql_write_page2_reg(struct ql3_adapter *qdev,
238 u32 * reg, u32 value) 238 u32 __iomem *reg, u32 value)
239{ 239{
240 if (qdev->current_page != 2) 240 if (qdev->current_page != 2)
241 ql_set_register_page(qdev,2); 241 ql_set_register_page(qdev,2);
242 writel(value, (u32 *) reg); 242 writel(value, reg);
243 readl(reg); 243 readl(reg);
244 return; 244 return;
245} 245}
@@ -1687,7 +1687,7 @@ static void ql_update_lrg_bufq_prod_index(struct ql3_adapter *qdev)
1687 qdev->lrg_buf_next_free = lrg_buf_q_ele; 1687 qdev->lrg_buf_next_free = lrg_buf_q_ele;
1688 1688
1689 ql_write_common_reg(qdev, 1689 ql_write_common_reg(qdev,
1690 (u32 *) & port_regs->CommonRegs. 1690 &port_regs->CommonRegs.
1691 rxLargeQProducerIndex, 1691 rxLargeQProducerIndex,
1692 qdev->lrg_buf_q_producer_index); 1692 qdev->lrg_buf_q_producer_index);
1693 } 1693 }
@@ -1924,13 +1924,13 @@ static int ql_tx_rx_clean(struct ql3_adapter *qdev,
1924 } 1924 }
1925 1925
1926 ql_write_common_reg(qdev, 1926 ql_write_common_reg(qdev,
1927 (u32 *) & port_regs->CommonRegs. 1927 &port_regs->CommonRegs.
1928 rxSmallQProducerIndex, 1928 rxSmallQProducerIndex,
1929 qdev->small_buf_q_producer_index); 1929 qdev->small_buf_q_producer_index);
1930 } 1930 }
1931 1931
1932 ql_write_common_reg(qdev, 1932 ql_write_common_reg(qdev,
1933 (u32 *) & port_regs->CommonRegs.rspQConsumerIndex, 1933 &port_regs->CommonRegs.rspQConsumerIndex,
1934 qdev->rsp_consumer_index); 1934 qdev->rsp_consumer_index);
1935 spin_unlock_irqrestore(&qdev->hw_lock, hw_flags); 1935 spin_unlock_irqrestore(&qdev->hw_lock, hw_flags);
1936 1936
@@ -2057,7 +2057,7 @@ static int ql3xxx_send(struct sk_buff *skb, struct net_device *ndev)
2057 qdev->req_producer_index = 0; 2057 qdev->req_producer_index = 0;
2058 wmb(); 2058 wmb();
2059 ql_write_common_reg_l(qdev, 2059 ql_write_common_reg_l(qdev,
2060 (u32 *) & port_regs->CommonRegs.reqQProducerIndex, 2060 &port_regs->CommonRegs.reqQProducerIndex,
2061 qdev->req_producer_index); 2061 qdev->req_producer_index);
2062 2062
2063 ndev->trans_start = jiffies; 2063 ndev->trans_start = jiffies;
@@ -2474,8 +2474,8 @@ static void ql_free_mem_resources(struct ql3_adapter *qdev)
2474 2474
2475static int ql_init_misc_registers(struct ql3_adapter *qdev) 2475static int ql_init_misc_registers(struct ql3_adapter *qdev)
2476{ 2476{
2477 struct ql3xxx_local_ram_registers *local_ram = 2477 struct ql3xxx_local_ram_registers __iomem *local_ram =
2478 (struct ql3xxx_local_ram_registers *)qdev->mem_map_registers; 2478 (void __iomem *)qdev->mem_map_registers;
2479 2479
2480 if(ql_sem_spinlock(qdev, QL_DDR_RAM_SEM_MASK, 2480 if(ql_sem_spinlock(qdev, QL_DDR_RAM_SEM_MASK,
2481 (QL_RESOURCE_BITS_BASE_CODE | (qdev->mac_index) * 2481 (QL_RESOURCE_BITS_BASE_CODE | (qdev->mac_index) *
@@ -2535,7 +2535,7 @@ static int ql_adapter_initialize(struct ql3_adapter *qdev)
2535 u32 value; 2535 u32 value;
2536 struct ql3xxx_port_registers __iomem *port_regs = qdev->mem_map_registers; 2536 struct ql3xxx_port_registers __iomem *port_regs = qdev->mem_map_registers;
2537 struct ql3xxx_host_memory_registers __iomem *hmem_regs = 2537 struct ql3xxx_host_memory_registers __iomem *hmem_regs =
2538 (struct ql3xxx_host_memory_registers *)port_regs; 2538 (void __iomem *)port_regs;
2539 u32 delay = 10; 2539 u32 delay = 10;
2540 int status = 0; 2540 int status = 0;
2541 2541
@@ -2640,11 +2640,11 @@ static int ql_adapter_initialize(struct ql3_adapter *qdev)
2640 qdev->lrg_buf_free_tail = NULL; 2640 qdev->lrg_buf_free_tail = NULL;
2641 2641
2642 ql_write_common_reg(qdev, 2642 ql_write_common_reg(qdev,
2643 (u32 *) & port_regs->CommonRegs. 2643 &port_regs->CommonRegs.
2644 rxSmallQProducerIndex, 2644 rxSmallQProducerIndex,
2645 qdev->small_buf_q_producer_index); 2645 qdev->small_buf_q_producer_index);
2646 ql_write_common_reg(qdev, 2646 ql_write_common_reg(qdev,
2647 (u32 *) & port_regs->CommonRegs. 2647 &port_regs->CommonRegs.
2648 rxLargeQProducerIndex, 2648 rxLargeQProducerIndex,
2649 qdev->lrg_buf_q_producer_index); 2649 qdev->lrg_buf_q_producer_index);
2650 2650
@@ -2787,7 +2787,7 @@ static int ql_adapter_reset(struct ql3_adapter *qdev)
2787 "%s: Issue soft reset to chip.\n", 2787 "%s: Issue soft reset to chip.\n",
2788 qdev->ndev->name); 2788 qdev->ndev->name);
2789 ql_write_common_reg(qdev, 2789 ql_write_common_reg(qdev,
2790 (u32 *) & port_regs->CommonRegs.ispControlStatus, 2790 &port_regs->CommonRegs.ispControlStatus,
2791 ((ISP_CONTROL_SR << 16) | ISP_CONTROL_SR)); 2791 ((ISP_CONTROL_SR << 16) | ISP_CONTROL_SR));
2792 2792
2793 /* Wait 3 seconds for reset to complete. */ 2793 /* Wait 3 seconds for reset to complete. */
@@ -2817,7 +2817,7 @@ static int ql_adapter_reset(struct ql3_adapter *qdev)
2817 printk(KERN_DEBUG PFX 2817 printk(KERN_DEBUG PFX
2818 "ql_adapter_reset: clearing RI after reset.\n"); 2818 "ql_adapter_reset: clearing RI after reset.\n");
2819 ql_write_common_reg(qdev, 2819 ql_write_common_reg(qdev,
2820 (u32 *) & port_regs->CommonRegs. 2820 &port_regs->CommonRegs.
2821 ispControlStatus, 2821 ispControlStatus,
2822 ((ISP_CONTROL_RI << 16) | ISP_CONTROL_RI)); 2822 ((ISP_CONTROL_RI << 16) | ISP_CONTROL_RI));
2823 } 2823 }
@@ -2825,7 +2825,7 @@ static int ql_adapter_reset(struct ql3_adapter *qdev)
2825 if (max_wait_time == 0) { 2825 if (max_wait_time == 0) {
2826 /* Issue Force Soft Reset */ 2826 /* Issue Force Soft Reset */
2827 ql_write_common_reg(qdev, 2827 ql_write_common_reg(qdev,
2828 (u32 *) & port_regs->CommonRegs. 2828 &port_regs->CommonRegs.
2829 ispControlStatus, 2829 ispControlStatus,
2830 ((ISP_CONTROL_FSR << 16) | 2830 ((ISP_CONTROL_FSR << 16) |
2831 ISP_CONTROL_FSR)); 2831 ISP_CONTROL_FSR));
@@ -3243,8 +3243,7 @@ static void ql_reset_work(struct ql3_adapter *qdev)
3243 "%s: clearing NRI after reset.\n", 3243 "%s: clearing NRI after reset.\n",
3244 qdev->ndev->name); 3244 qdev->ndev->name);
3245 ql_write_common_reg(qdev, 3245 ql_write_common_reg(qdev,
3246 (u32 *) & 3246 &port_regs->
3247 port_regs->
3248 CommonRegs. 3247 CommonRegs.
3249 ispControlStatus, 3248 ispControlStatus,
3250 ((ISP_CONTROL_RI << 3249 ((ISP_CONTROL_RI <<
@@ -3509,7 +3508,7 @@ static void __devexit ql3xxx_remove(struct pci_dev *pdev)
3509 qdev->workqueue = NULL; 3508 qdev->workqueue = NULL;
3510 } 3509 }
3511 3510
3512 iounmap((void *)qdev->mmap_virt_base); 3511 iounmap(qdev->mem_map_registers);
3513 pci_release_regions(pdev); 3512 pci_release_regions(pdev);
3514 pci_set_drvdata(pdev, NULL); 3513 pci_set_drvdata(pdev, NULL);
3515 free_netdev(ndev); 3514 free_netdev(ndev);
diff --git a/drivers/net/qla3xxx.h b/drivers/net/qla3xxx.h
index 9492cee6b083..65da2c0bfda6 100644
--- a/drivers/net/qla3xxx.h
+++ b/drivers/net/qla3xxx.h
@@ -1093,7 +1093,7 @@ struct ql3_adapter {
1093 spinlock_t hw_lock; 1093 spinlock_t hw_lock;
1094 1094
1095 /* PCI Bus Relative Register Addresses */ 1095 /* PCI Bus Relative Register Addresses */
1096 u8 *mmap_virt_base; /* stores return value from ioremap() */ 1096 u8 __iomem *mmap_virt_base; /* stores return value from ioremap() */
1097 struct ql3xxx_port_registers __iomem *mem_map_registers; 1097 struct ql3xxx_port_registers __iomem *mem_map_registers;
1098 u32 current_page; /* tracks current register page */ 1098 u32 current_page; /* tracks current register page */
1099 1099
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
1326static int __init sparc_lance_probe_one(struct sbus_dev *sdev, 1326static 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 */
1518static inline struct sbus_dma *find_ledma(struct sbus_dev *sdev) 1518static 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 */
1535static struct sbus_dev sun4_sdev; 1535static struct sbus_dev sun4_sdev;
1536static int __init sparc_lance_init(void) 1536static 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/scsi/aic94xx/aic94xx.h b/drivers/scsi/aic94xx/aic94xx.h
index 1bd5b4ecf3d5..71a031df7a34 100644
--- a/drivers/scsi/aic94xx/aic94xx.h
+++ b/drivers/scsi/aic94xx/aic94xx.h
@@ -94,7 +94,7 @@ void asd_dev_gone(struct domain_device *dev);
94 94
95void asd_invalidate_edb(struct asd_ascb *ascb, int edb_id); 95void asd_invalidate_edb(struct asd_ascb *ascb, int edb_id);
96 96
97int asd_execute_task(struct sas_task *, int num, unsigned long gfp_flags); 97int asd_execute_task(struct sas_task *, int num, gfp_t gfp_flags);
98 98
99/* ---------- TMFs ---------- */ 99/* ---------- TMFs ---------- */
100int asd_abort_task(struct sas_task *); 100int asd_abort_task(struct sas_task *);
diff --git a/drivers/scsi/aic94xx/aic94xx_hwi.c b/drivers/scsi/aic94xx/aic94xx_hwi.c
index a24201351108..1d8c5e5f442e 100644
--- a/drivers/scsi/aic94xx/aic94xx_hwi.c
+++ b/drivers/scsi/aic94xx/aic94xx_hwi.c
@@ -267,7 +267,7 @@ static int asd_init_dl(struct asd_ha_struct *asd_ha)
267 267
268/* ---------- EDB and ESCB init ---------- */ 268/* ---------- EDB and ESCB init ---------- */
269 269
270static int asd_alloc_edbs(struct asd_ha_struct *asd_ha, unsigned int gfp_flags) 270static int asd_alloc_edbs(struct asd_ha_struct *asd_ha, gfp_t gfp_flags)
271{ 271{
272 struct asd_seq_data *seq = &asd_ha->seq; 272 struct asd_seq_data *seq = &asd_ha->seq;
273 int i; 273 int i;
@@ -298,7 +298,7 @@ Err_unroll:
298} 298}
299 299
300static int asd_alloc_escbs(struct asd_ha_struct *asd_ha, 300static int asd_alloc_escbs(struct asd_ha_struct *asd_ha,
301 unsigned int gfp_flags) 301 gfp_t gfp_flags)
302{ 302{
303 struct asd_seq_data *seq = &asd_ha->seq; 303 struct asd_seq_data *seq = &asd_ha->seq;
304 struct asd_ascb *escb; 304 struct asd_ascb *escb;
@@ -1028,7 +1028,7 @@ irqreturn_t asd_hw_isr(int irq, void *dev_id, struct pt_regs *regs)
1028/* ---------- SCB handling ---------- */ 1028/* ---------- SCB handling ---------- */
1029 1029
1030static inline struct asd_ascb *asd_ascb_alloc(struct asd_ha_struct *asd_ha, 1030static inline struct asd_ascb *asd_ascb_alloc(struct asd_ha_struct *asd_ha,
1031 unsigned int gfp_flags) 1031 gfp_t gfp_flags)
1032{ 1032{
1033 extern kmem_cache_t *asd_ascb_cache; 1033 extern kmem_cache_t *asd_ascb_cache;
1034 struct asd_seq_data *seq = &asd_ha->seq; 1034 struct asd_seq_data *seq = &asd_ha->seq;
@@ -1086,7 +1086,7 @@ undo:
1086 */ 1086 */
1087struct asd_ascb *asd_ascb_alloc_list(struct asd_ha_struct 1087struct asd_ascb *asd_ascb_alloc_list(struct asd_ha_struct
1088 *asd_ha, int *num, 1088 *asd_ha, int *num,
1089 unsigned int gfp_flags) 1089 gfp_t gfp_flags)
1090{ 1090{
1091 struct asd_ascb *first = NULL; 1091 struct asd_ascb *first = NULL;
1092 1092
diff --git a/drivers/scsi/aic94xx/aic94xx_hwi.h b/drivers/scsi/aic94xx/aic94xx_hwi.h
index c7d505388fed..8498144aa5e1 100644
--- a/drivers/scsi/aic94xx/aic94xx_hwi.h
+++ b/drivers/scsi/aic94xx/aic94xx_hwi.h
@@ -242,7 +242,7 @@ struct asd_ha_struct {
242 242
243/* ---------- DMA allocs ---------- */ 243/* ---------- DMA allocs ---------- */
244 244
245static inline struct asd_dma_tok *asd_dmatok_alloc(unsigned int flags) 245static inline struct asd_dma_tok *asd_dmatok_alloc(gfp_t flags)
246{ 246{
247 return kmem_cache_alloc(asd_dma_token_cache, flags); 247 return kmem_cache_alloc(asd_dma_token_cache, flags);
248} 248}
@@ -254,7 +254,7 @@ static inline void asd_dmatok_free(struct asd_dma_tok *token)
254 254
255static inline struct asd_dma_tok *asd_alloc_coherent(struct asd_ha_struct * 255static inline struct asd_dma_tok *asd_alloc_coherent(struct asd_ha_struct *
256 asd_ha, size_t size, 256 asd_ha, size_t size,
257 unsigned int flags) 257 gfp_t flags)
258{ 258{
259 struct asd_dma_tok *token = asd_dmatok_alloc(flags); 259 struct asd_dma_tok *token = asd_dmatok_alloc(flags);
260 if (token) { 260 if (token) {
@@ -376,7 +376,7 @@ irqreturn_t asd_hw_isr(int irq, void *dev_id, struct pt_regs *regs);
376 376
377struct asd_ascb *asd_ascb_alloc_list(struct asd_ha_struct 377struct asd_ascb *asd_ascb_alloc_list(struct asd_ha_struct
378 *asd_ha, int *num, 378 *asd_ha, int *num,
379 unsigned int gfp_mask); 379 gfp_t gfp_mask);
380 380
381int asd_post_ascb_list(struct asd_ha_struct *asd_ha, struct asd_ascb *ascb, 381int asd_post_ascb_list(struct asd_ha_struct *asd_ha, struct asd_ascb *ascb,
382 int num); 382 int num);
diff --git a/drivers/scsi/aic94xx/aic94xx_seq.c b/drivers/scsi/aic94xx/aic94xx_seq.c
index d9b6da5fd06c..56e4b3ba6a08 100644
--- a/drivers/scsi/aic94xx/aic94xx_seq.c
+++ b/drivers/scsi/aic94xx/aic94xx_seq.c
@@ -764,7 +764,7 @@ static void asd_init_lseq_mdp(struct asd_ha_struct *asd_ha, int lseq)
764 asd_write_reg_word(asd_ha, LmSEQ_FIRST_INV_SCB_SITE(lseq), 764 asd_write_reg_word(asd_ha, LmSEQ_FIRST_INV_SCB_SITE(lseq),
765 (u16)last_scb_site_no+1); 765 (u16)last_scb_site_no+1);
766 asd_write_reg_word(asd_ha, LmSEQ_INTEN_SAVE(lseq), 766 asd_write_reg_word(asd_ha, LmSEQ_INTEN_SAVE(lseq),
767 (u16) LmM0INTEN_MASK & 0xFFFF0000 >> 16); 767 (u16) ((LmM0INTEN_MASK & 0xFFFF0000) >> 16));
768 asd_write_reg_word(asd_ha, LmSEQ_INTEN_SAVE(lseq) + 2, 768 asd_write_reg_word(asd_ha, LmSEQ_INTEN_SAVE(lseq) + 2,
769 (u16) LmM0INTEN_MASK & 0xFFFF); 769 (u16) LmM0INTEN_MASK & 0xFFFF);
770 asd_write_reg_byte(asd_ha, LmSEQ_LINK_RST_FRM_LEN(lseq), 0); 770 asd_write_reg_byte(asd_ha, LmSEQ_LINK_RST_FRM_LEN(lseq), 0);
diff --git a/drivers/scsi/aic94xx/aic94xx_task.c b/drivers/scsi/aic94xx/aic94xx_task.c
index 285e70dae933..d202ed5a6709 100644
--- a/drivers/scsi/aic94xx/aic94xx_task.c
+++ b/drivers/scsi/aic94xx/aic94xx_task.c
@@ -53,7 +53,7 @@ static const u8 data_dir_flags[] = {
53 53
54static inline int asd_map_scatterlist(struct sas_task *task, 54static inline int asd_map_scatterlist(struct sas_task *task,
55 struct sg_el *sg_arr, 55 struct sg_el *sg_arr,
56 unsigned long gfp_flags) 56 gfp_t gfp_flags)
57{ 57{
58 struct asd_ascb *ascb = task->lldd_task; 58 struct asd_ascb *ascb = task->lldd_task;
59 struct asd_ha_struct *asd_ha = ascb->ha; 59 struct asd_ha_struct *asd_ha = ascb->ha;
@@ -368,7 +368,7 @@ Again:
368/* ---------- ATA ---------- */ 368/* ---------- ATA ---------- */
369 369
370static int asd_build_ata_ascb(struct asd_ascb *ascb, struct sas_task *task, 370static int asd_build_ata_ascb(struct asd_ascb *ascb, struct sas_task *task,
371 unsigned long gfp_flags) 371 gfp_t gfp_flags)
372{ 372{
373 struct domain_device *dev = task->dev; 373 struct domain_device *dev = task->dev;
374 struct scb *scb; 374 struct scb *scb;
@@ -437,7 +437,7 @@ static void asd_unbuild_ata_ascb(struct asd_ascb *a)
437/* ---------- SMP ---------- */ 437/* ---------- SMP ---------- */
438 438
439static int asd_build_smp_ascb(struct asd_ascb *ascb, struct sas_task *task, 439static int asd_build_smp_ascb(struct asd_ascb *ascb, struct sas_task *task,
440 unsigned long gfp_flags) 440 gfp_t gfp_flags)
441{ 441{
442 struct asd_ha_struct *asd_ha = ascb->ha; 442 struct asd_ha_struct *asd_ha = ascb->ha;
443 struct domain_device *dev = task->dev; 443 struct domain_device *dev = task->dev;
@@ -487,7 +487,7 @@ static void asd_unbuild_smp_ascb(struct asd_ascb *a)
487/* ---------- SSP ---------- */ 487/* ---------- SSP ---------- */
488 488
489static int asd_build_ssp_ascb(struct asd_ascb *ascb, struct sas_task *task, 489static int asd_build_ssp_ascb(struct asd_ascb *ascb, struct sas_task *task,
490 unsigned long gfp_flags) 490 gfp_t gfp_flags)
491{ 491{
492 struct domain_device *dev = task->dev; 492 struct domain_device *dev = task->dev;
493 struct scb *scb; 493 struct scb *scb;
@@ -550,7 +550,7 @@ static inline int asd_can_queue(struct asd_ha_struct *asd_ha, int num)
550} 550}
551 551
552int asd_execute_task(struct sas_task *task, const int num, 552int asd_execute_task(struct sas_task *task, const int num,
553 unsigned long gfp_flags) 553 gfp_t gfp_flags)
554{ 554{
555 int res = 0; 555 int res = 0;
556 LIST_HEAD(alist); 556 LIST_HEAD(alist);
diff --git a/drivers/scsi/libsas/sas_scsi_host.c b/drivers/scsi/libsas/sas_scsi_host.c
index 43e0e4e36934..7f9e89bcac7e 100644
--- a/drivers/scsi/libsas/sas_scsi_host.c
+++ b/drivers/scsi/libsas/sas_scsi_host.c
@@ -134,7 +134,7 @@ static enum task_attribute sas_scsi_get_task_attr(struct scsi_cmnd *cmd)
134 134
135static struct sas_task *sas_create_task(struct scsi_cmnd *cmd, 135static struct sas_task *sas_create_task(struct scsi_cmnd *cmd,
136 struct domain_device *dev, 136 struct domain_device *dev,
137 unsigned long gfp_flags) 137 gfp_t gfp_flags)
138{ 138{
139 struct sas_task *task = sas_alloc_task(gfp_flags); 139 struct sas_task *task = sas_alloc_task(gfp_flags);
140 struct scsi_lun lun; 140 struct scsi_lun lun;
diff --git a/drivers/scsi/scsi.c b/drivers/scsi/scsi.c
index c51b5769eac8..7a054f9d1ee3 100644
--- a/drivers/scsi/scsi.c
+++ b/drivers/scsi/scsi.c
@@ -96,22 +96,26 @@ unsigned int scsi_logging_level;
96EXPORT_SYMBOL(scsi_logging_level); 96EXPORT_SYMBOL(scsi_logging_level);
97#endif 97#endif
98 98
99/* NB: These are exposed through /proc/scsi/scsi and form part of the ABI.
100 * You may not alter any existing entry (although adding new ones is
101 * encouraged once assigned by ANSI/INCITS T10
102 */
99static const char *const scsi_device_types[] = { 103static const char *const scsi_device_types[] = {
100 "Direct access ", 104 "Direct-Access ",
101 "Sequential access", 105 "Sequential-Access",
102 "Printer ", 106 "Printer ",
103 "Processor ", 107 "Processor ",
104 "WORM ", 108 "WORM ",
105 "CD/DVD ", 109 "CD-ROM ",
106 "Scanner ", 110 "Scanner ",
107 "Optical memory ", 111 "Optical Device ",
108 "Media changer ", 112 "Medium Changer ",
109 "Communications ", 113 "Communications ",
110 "ASC IT8 ", 114 "ASC IT8 ",
111 "ASC IT8 ", 115 "ASC IT8 ",
112 "RAID ", 116 "RAID ",
113 "Enclosure ", 117 "Enclosure ",
114 "Direct access RBC", 118 "Direct-Access-RBC",
115 "Optical card ", 119 "Optical card ",
116 "Bridge controller", 120 "Bridge controller",
117 "Object storage ", 121 "Object storage ",
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,