aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2010-08-12 12:11:31 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2010-08-12 12:11:31 -0400
commit58d4ea65b98f154f3326b038eecda32f90b46ea8 (patch)
tree636aed413349dece12c08a4bd3d1fea0254976d8 /drivers/scsi
parent26f0cf91813bdc8e61595f8ad6660251e2ee9cf6 (diff)
parentfbe0f8348fd6c3d016a3f48756eb729b41a67c22 (diff)
Merge branch 'next-devicetree' of git://git.secretlab.ca/git/linux-2.6
* 'next-devicetree' of git://git.secretlab.ca/git/linux-2.6: mmc_spi: Fix unterminated of_match_table of/sparc: fix build regression from of_device changes of/device: Replace struct of_device with struct platform_device
Diffstat (limited to 'drivers/scsi')
-rw-r--r--drivers/scsi/qlogicpti.c14
-rw-r--r--drivers/scsi/qlogicpti.h2
-rw-r--r--drivers/scsi/sun_esp.c44
3 files changed, 30 insertions, 30 deletions
diff --git a/drivers/scsi/qlogicpti.c b/drivers/scsi/qlogicpti.c
index 53d7ed0dc169..f8c561cf751e 100644
--- a/drivers/scsi/qlogicpti.c
+++ b/drivers/scsi/qlogicpti.c
@@ -704,7 +704,7 @@ static void __devexit qpti_chain_del(struct qlogicpti *qpti)
704 704
705static int __devinit qpti_map_regs(struct qlogicpti *qpti) 705static int __devinit qpti_map_regs(struct qlogicpti *qpti)
706{ 706{
707 struct of_device *op = qpti->op; 707 struct platform_device *op = qpti->op;
708 708
709 qpti->qregs = of_ioremap(&op->resource[0], 0, 709 qpti->qregs = of_ioremap(&op->resource[0], 0,
710 resource_size(&op->resource[0]), 710 resource_size(&op->resource[0]),
@@ -727,7 +727,7 @@ static int __devinit qpti_map_regs(struct qlogicpti *qpti)
727 727
728static int __devinit qpti_register_irq(struct qlogicpti *qpti) 728static int __devinit qpti_register_irq(struct qlogicpti *qpti)
729{ 729{
730 struct of_device *op = qpti->op; 730 struct platform_device *op = qpti->op;
731 731
732 qpti->qhost->irq = qpti->irq = op->archdata.irqs[0]; 732 qpti->qhost->irq = qpti->irq = op->archdata.irqs[0];
733 733
@@ -752,7 +752,7 @@ fail:
752 752
753static void __devinit qpti_get_scsi_id(struct qlogicpti *qpti) 753static void __devinit qpti_get_scsi_id(struct qlogicpti *qpti)
754{ 754{
755 struct of_device *op = qpti->op; 755 struct platform_device *op = qpti->op;
756 struct device_node *dp; 756 struct device_node *dp;
757 757
758 dp = op->dev.of_node; 758 dp = op->dev.of_node;
@@ -773,7 +773,7 @@ static void __devinit qpti_get_scsi_id(struct qlogicpti *qpti)
773 773
774static void qpti_get_bursts(struct qlogicpti *qpti) 774static void qpti_get_bursts(struct qlogicpti *qpti)
775{ 775{
776 struct of_device *op = qpti->op; 776 struct platform_device *op = qpti->op;
777 u8 bursts, bmask; 777 u8 bursts, bmask;
778 778
779 bursts = of_getintprop_default(op->dev.of_node, "burst-sizes", 0xff); 779 bursts = of_getintprop_default(op->dev.of_node, "burst-sizes", 0xff);
@@ -806,7 +806,7 @@ static void qpti_get_clock(struct qlogicpti *qpti)
806 */ 806 */
807static int __devinit qpti_map_queues(struct qlogicpti *qpti) 807static int __devinit qpti_map_queues(struct qlogicpti *qpti)
808{ 808{
809 struct of_device *op = qpti->op; 809 struct platform_device *op = qpti->op;
810 810
811#define QSIZE(entries) (((entries) + 1) * QUEUE_ENTRY_LEN) 811#define QSIZE(entries) (((entries) + 1) * QUEUE_ENTRY_LEN)
812 qpti->res_cpu = dma_alloc_coherent(&op->dev, 812 qpti->res_cpu = dma_alloc_coherent(&op->dev,
@@ -1290,7 +1290,7 @@ static struct scsi_host_template qpti_template = {
1290 .use_clustering = ENABLE_CLUSTERING, 1290 .use_clustering = ENABLE_CLUSTERING,
1291}; 1291};
1292 1292
1293static int __devinit qpti_sbus_probe(struct of_device *op, const struct of_device_id *match) 1293static int __devinit qpti_sbus_probe(struct platform_device *op, const struct of_device_id *match)
1294{ 1294{
1295 struct scsi_host_template *tpnt = match->data; 1295 struct scsi_host_template *tpnt = match->data;
1296 struct device_node *dp = op->dev.of_node; 1296 struct device_node *dp = op->dev.of_node;
@@ -1401,7 +1401,7 @@ fail_unlink:
1401 return -ENODEV; 1401 return -ENODEV;
1402} 1402}
1403 1403
1404static int __devexit qpti_sbus_remove(struct of_device *op) 1404static int __devexit qpti_sbus_remove(struct platform_device *op)
1405{ 1405{
1406 struct qlogicpti *qpti = dev_get_drvdata(&op->dev); 1406 struct qlogicpti *qpti = dev_get_drvdata(&op->dev);
1407 1407
diff --git a/drivers/scsi/qlogicpti.h b/drivers/scsi/qlogicpti.h
index e3c74d1ee2db..4377e87ee79c 100644
--- a/drivers/scsi/qlogicpti.h
+++ b/drivers/scsi/qlogicpti.h
@@ -342,7 +342,7 @@ struct qlogicpti {
342 u_int req_in_ptr; /* index of next request slot */ 342 u_int req_in_ptr; /* index of next request slot */
343 u_int res_out_ptr; /* index of next result slot */ 343 u_int res_out_ptr; /* index of next result slot */
344 long send_marker; /* must we send a marker? */ 344 long send_marker; /* must we send a marker? */
345 struct of_device *op; 345 struct platform_device *op;
346 unsigned long __pad; 346 unsigned long __pad;
347 347
348 int cmd_count[MAX_TARGETS]; 348 int cmd_count[MAX_TARGETS];
diff --git a/drivers/scsi/sun_esp.c b/drivers/scsi/sun_esp.c
index 89ba6fe02f80..193b37ba1834 100644
--- a/drivers/scsi/sun_esp.c
+++ b/drivers/scsi/sun_esp.c
@@ -44,7 +44,7 @@ enum dvma_rev {
44}; 44};
45 45
46static int __devinit esp_sbus_setup_dma(struct esp *esp, 46static int __devinit esp_sbus_setup_dma(struct esp *esp,
47 struct of_device *dma_of) 47 struct platform_device *dma_of)
48{ 48{
49 esp->dma = dma_of; 49 esp->dma = dma_of;
50 50
@@ -81,7 +81,7 @@ static int __devinit esp_sbus_setup_dma(struct esp *esp,
81 81
82static int __devinit esp_sbus_map_regs(struct esp *esp, int hme) 82static int __devinit esp_sbus_map_regs(struct esp *esp, int hme)
83{ 83{
84 struct of_device *op = esp->dev; 84 struct platform_device *op = esp->dev;
85 struct resource *res; 85 struct resource *res;
86 86
87 /* On HME, two reg sets exist, first is DVMA, 87 /* On HME, two reg sets exist, first is DVMA,
@@ -101,7 +101,7 @@ static int __devinit esp_sbus_map_regs(struct esp *esp, int hme)
101 101
102static int __devinit esp_sbus_map_command_block(struct esp *esp) 102static int __devinit esp_sbus_map_command_block(struct esp *esp)
103{ 103{
104 struct of_device *op = esp->dev; 104 struct platform_device *op = esp->dev;
105 105
106 esp->command_block = dma_alloc_coherent(&op->dev, 16, 106 esp->command_block = dma_alloc_coherent(&op->dev, 16,
107 &esp->command_block_dma, 107 &esp->command_block_dma,
@@ -114,15 +114,15 @@ static int __devinit esp_sbus_map_command_block(struct esp *esp)
114static int __devinit esp_sbus_register_irq(struct esp *esp) 114static int __devinit esp_sbus_register_irq(struct esp *esp)
115{ 115{
116 struct Scsi_Host *host = esp->host; 116 struct Scsi_Host *host = esp->host;
117 struct of_device *op = esp->dev; 117 struct platform_device *op = esp->dev;
118 118
119 host->irq = op->archdata.irqs[0]; 119 host->irq = op->archdata.irqs[0];
120 return request_irq(host->irq, scsi_esp_intr, IRQF_SHARED, "ESP", esp); 120 return request_irq(host->irq, scsi_esp_intr, IRQF_SHARED, "ESP", esp);
121} 121}
122 122
123static void __devinit esp_get_scsi_id(struct esp *esp, struct of_device *espdma) 123static void __devinit esp_get_scsi_id(struct esp *esp, struct platform_device *espdma)
124{ 124{
125 struct of_device *op = esp->dev; 125 struct platform_device *op = esp->dev;
126 struct device_node *dp; 126 struct device_node *dp;
127 127
128 dp = op->dev.of_node; 128 dp = op->dev.of_node;
@@ -144,7 +144,7 @@ done:
144 144
145static void __devinit esp_get_differential(struct esp *esp) 145static void __devinit esp_get_differential(struct esp *esp)
146{ 146{
147 struct of_device *op = esp->dev; 147 struct platform_device *op = esp->dev;
148 struct device_node *dp; 148 struct device_node *dp;
149 149
150 dp = op->dev.of_node; 150 dp = op->dev.of_node;
@@ -156,7 +156,7 @@ static void __devinit esp_get_differential(struct esp *esp)
156 156
157static void __devinit esp_get_clock_params(struct esp *esp) 157static void __devinit esp_get_clock_params(struct esp *esp)
158{ 158{
159 struct of_device *op = esp->dev; 159 struct platform_device *op = esp->dev;
160 struct device_node *bus_dp, *dp; 160 struct device_node *bus_dp, *dp;
161 int fmhz; 161 int fmhz;
162 162
@@ -170,10 +170,10 @@ static void __devinit esp_get_clock_params(struct esp *esp)
170 esp->cfreq = fmhz; 170 esp->cfreq = fmhz;
171} 171}
172 172
173static void __devinit esp_get_bursts(struct esp *esp, struct of_device *dma_of) 173static void __devinit esp_get_bursts(struct esp *esp, struct platform_device *dma_of)
174{ 174{
175 struct device_node *dma_dp = dma_of->dev.of_node; 175 struct device_node *dma_dp = dma_of->dev.of_node;
176 struct of_device *op = esp->dev; 176 struct platform_device *op = esp->dev;
177 struct device_node *dp; 177 struct device_node *dp;
178 u8 bursts, val; 178 u8 bursts, val;
179 179
@@ -195,7 +195,7 @@ static void __devinit esp_get_bursts(struct esp *esp, struct of_device *dma_of)
195 esp->bursts = bursts; 195 esp->bursts = bursts;
196} 196}
197 197
198static void __devinit esp_sbus_get_props(struct esp *esp, struct of_device *espdma) 198static void __devinit esp_sbus_get_props(struct esp *esp, struct platform_device *espdma)
199{ 199{
200 esp_get_scsi_id(esp, espdma); 200 esp_get_scsi_id(esp, espdma);
201 esp_get_differential(esp); 201 esp_get_differential(esp);
@@ -216,7 +216,7 @@ static u8 sbus_esp_read8(struct esp *esp, unsigned long reg)
216static dma_addr_t sbus_esp_map_single(struct esp *esp, void *buf, 216static dma_addr_t sbus_esp_map_single(struct esp *esp, void *buf,
217 size_t sz, int dir) 217 size_t sz, int dir)
218{ 218{
219 struct of_device *op = esp->dev; 219 struct platform_device *op = esp->dev;
220 220
221 return dma_map_single(&op->dev, buf, sz, dir); 221 return dma_map_single(&op->dev, buf, sz, dir);
222} 222}
@@ -224,7 +224,7 @@ static dma_addr_t sbus_esp_map_single(struct esp *esp, void *buf,
224static int sbus_esp_map_sg(struct esp *esp, struct scatterlist *sg, 224static int sbus_esp_map_sg(struct esp *esp, struct scatterlist *sg,
225 int num_sg, int dir) 225 int num_sg, int dir)
226{ 226{
227 struct of_device *op = esp->dev; 227 struct platform_device *op = esp->dev;
228 228
229 return dma_map_sg(&op->dev, sg, num_sg, dir); 229 return dma_map_sg(&op->dev, sg, num_sg, dir);
230} 230}
@@ -232,7 +232,7 @@ static int sbus_esp_map_sg(struct esp *esp, struct scatterlist *sg,
232static void sbus_esp_unmap_single(struct esp *esp, dma_addr_t addr, 232static void sbus_esp_unmap_single(struct esp *esp, dma_addr_t addr,
233 size_t sz, int dir) 233 size_t sz, int dir)
234{ 234{
235 struct of_device *op = esp->dev; 235 struct platform_device *op = esp->dev;
236 236
237 dma_unmap_single(&op->dev, addr, sz, dir); 237 dma_unmap_single(&op->dev, addr, sz, dir);
238} 238}
@@ -240,7 +240,7 @@ static void sbus_esp_unmap_single(struct esp *esp, dma_addr_t addr,
240static void sbus_esp_unmap_sg(struct esp *esp, struct scatterlist *sg, 240static void sbus_esp_unmap_sg(struct esp *esp, struct scatterlist *sg,
241 int num_sg, int dir) 241 int num_sg, int dir)
242{ 242{
243 struct of_device *op = esp->dev; 243 struct platform_device *op = esp->dev;
244 244
245 dma_unmap_sg(&op->dev, sg, num_sg, dir); 245 dma_unmap_sg(&op->dev, sg, num_sg, dir);
246} 246}
@@ -256,7 +256,7 @@ static void sbus_esp_reset_dma(struct esp *esp)
256{ 256{
257 int can_do_burst16, can_do_burst32, can_do_burst64; 257 int can_do_burst16, can_do_burst32, can_do_burst64;
258 int can_do_sbus64, lim; 258 int can_do_sbus64, lim;
259 struct of_device *op; 259 struct platform_device *op;
260 u32 val; 260 u32 val;
261 261
262 can_do_burst16 = (esp->bursts & DMA_BURST16) != 0; 262 can_do_burst16 = (esp->bursts & DMA_BURST16) != 0;
@@ -487,8 +487,8 @@ static const struct esp_driver_ops sbus_esp_ops = {
487 .dma_error = sbus_esp_dma_error, 487 .dma_error = sbus_esp_dma_error,
488}; 488};
489 489
490static int __devinit esp_sbus_probe_one(struct of_device *op, 490static int __devinit esp_sbus_probe_one(struct platform_device *op,
491 struct of_device *espdma, 491 struct platform_device *espdma,
492 int hme) 492 int hme)
493{ 493{
494 struct scsi_host_template *tpnt = &scsi_esp_template; 494 struct scsi_host_template *tpnt = &scsi_esp_template;
@@ -562,11 +562,11 @@ fail:
562 return err; 562 return err;
563} 563}
564 564
565static int __devinit esp_sbus_probe(struct of_device *op, const struct of_device_id *match) 565static int __devinit esp_sbus_probe(struct platform_device *op, const struct of_device_id *match)
566{ 566{
567 struct device_node *dma_node = NULL; 567 struct device_node *dma_node = NULL;
568 struct device_node *dp = op->dev.of_node; 568 struct device_node *dp = op->dev.of_node;
569 struct of_device *dma_of = NULL; 569 struct platform_device *dma_of = NULL;
570 int hme = 0; 570 int hme = 0;
571 571
572 if (dp->parent && 572 if (dp->parent &&
@@ -585,10 +585,10 @@ static int __devinit esp_sbus_probe(struct of_device *op, const struct of_device
585 return esp_sbus_probe_one(op, dma_of, hme); 585 return esp_sbus_probe_one(op, dma_of, hme);
586} 586}
587 587
588static int __devexit esp_sbus_remove(struct of_device *op) 588static int __devexit esp_sbus_remove(struct platform_device *op)
589{ 589{
590 struct esp *esp = dev_get_drvdata(&op->dev); 590 struct esp *esp = dev_get_drvdata(&op->dev);
591 struct of_device *dma_of = esp->dma; 591 struct platform_device *dma_of = esp->dma;
592 unsigned int irq = esp->host->irq; 592 unsigned int irq = esp->host->irq;
593 bool is_hme; 593 bool is_hme;
594 u32 val; 594 u32 val;