diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-05-24 10:37:38 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-05-24 10:37:38 -0400 |
commit | 62a11ae3405b6da2535d28e5facc2de5af4a7e62 (patch) | |
tree | 6b68f0e74fe08c0e87488ec0653d59c653e46745 /drivers/scsi | |
parent | cedfb2db7b2d6b2c780999536aa1e2650fadee36 (diff) | |
parent | cf9b59e9d3e008591d1f54830f570982bb307a0d (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:
of: change of_match_device to work with struct device
of: Remove duplicate fields from of_platform_driver
drivercore: Add of_match_table to the common device drivers
arch/microblaze: Move dma_mask from of_device into pdev_archdata
arch/powerpc: Move dma_mask from of_device into pdev_archdata
of: eliminate of_device->node and dev_archdata->{of,prom}_node
of: Always use 'struct device.of_node' to get device node pointer.
i2c/of: Allow device node to be passed via i2c_board_info
driver-core: Add device node pointer to struct device
of: protect contents of of_platform.h and of_device.h
of/flattree: Make unflatten_device_tree() safe to call from any arch
of/flattree: make of_fdt.h safe to unconditionally include.
Diffstat (limited to 'drivers/scsi')
-rw-r--r-- | drivers/scsi/ibmvscsi/ibmvfc.c | 2 | ||||
-rw-r--r-- | drivers/scsi/ibmvscsi/ibmvscsi.c | 2 | ||||
-rw-r--r-- | drivers/scsi/qlogicpti.c | 17 | ||||
-rw-r--r-- | drivers/scsi/sun_esp.c | 23 |
4 files changed, 25 insertions, 19 deletions
diff --git a/drivers/scsi/ibmvscsi/ibmvfc.c b/drivers/scsi/ibmvscsi/ibmvfc.c index 3eb2b7b3d8b0..fef49521cbc3 100644 --- a/drivers/scsi/ibmvscsi/ibmvfc.c +++ b/drivers/scsi/ibmvscsi/ibmvfc.c | |||
@@ -1157,7 +1157,7 @@ static void ibmvfc_gather_partition_info(struct ibmvfc_host *vhost) | |||
1157 | static void ibmvfc_set_login_info(struct ibmvfc_host *vhost) | 1157 | static void ibmvfc_set_login_info(struct ibmvfc_host *vhost) |
1158 | { | 1158 | { |
1159 | struct ibmvfc_npiv_login *login_info = &vhost->login_info; | 1159 | struct ibmvfc_npiv_login *login_info = &vhost->login_info; |
1160 | struct device_node *of_node = vhost->dev->archdata.of_node; | 1160 | struct device_node *of_node = vhost->dev->of_node; |
1161 | const char *location; | 1161 | const char *location; |
1162 | 1162 | ||
1163 | memset(login_info, 0, sizeof(*login_info)); | 1163 | memset(login_info, 0, sizeof(*login_info)); |
diff --git a/drivers/scsi/ibmvscsi/ibmvscsi.c b/drivers/scsi/ibmvscsi/ibmvscsi.c index 88bad0e81bdd..aad35cc41e49 100644 --- a/drivers/scsi/ibmvscsi/ibmvscsi.c +++ b/drivers/scsi/ibmvscsi/ibmvscsi.c | |||
@@ -932,7 +932,7 @@ static void send_mad_capabilities(struct ibmvscsi_host_data *hostdata) | |||
932 | struct viosrp_capabilities *req; | 932 | struct viosrp_capabilities *req; |
933 | struct srp_event_struct *evt_struct; | 933 | struct srp_event_struct *evt_struct; |
934 | unsigned long flags; | 934 | unsigned long flags; |
935 | struct device_node *of_node = hostdata->dev->archdata.of_node; | 935 | struct device_node *of_node = hostdata->dev->of_node; |
936 | const char *location; | 936 | const char *location; |
937 | 937 | ||
938 | evt_struct = get_event_struct(&hostdata->pool); | 938 | evt_struct = get_event_struct(&hostdata->pool); |
diff --git a/drivers/scsi/qlogicpti.c b/drivers/scsi/qlogicpti.c index aa406497eebc..ca5c15c779cf 100644 --- a/drivers/scsi/qlogicpti.c +++ b/drivers/scsi/qlogicpti.c | |||
@@ -755,7 +755,7 @@ static void __devinit qpti_get_scsi_id(struct qlogicpti *qpti) | |||
755 | struct of_device *op = qpti->op; | 755 | struct of_device *op = qpti->op; |
756 | struct device_node *dp; | 756 | struct device_node *dp; |
757 | 757 | ||
758 | dp = op->node; | 758 | dp = op->dev.of_node; |
759 | 759 | ||
760 | qpti->scsi_id = of_getintprop_default(dp, "initiator-id", -1); | 760 | qpti->scsi_id = of_getintprop_default(dp, "initiator-id", -1); |
761 | if (qpti->scsi_id == -1) | 761 | if (qpti->scsi_id == -1) |
@@ -776,8 +776,8 @@ static void qpti_get_bursts(struct qlogicpti *qpti) | |||
776 | struct of_device *op = qpti->op; | 776 | struct of_device *op = qpti->op; |
777 | u8 bursts, bmask; | 777 | u8 bursts, bmask; |
778 | 778 | ||
779 | bursts = of_getintprop_default(op->node, "burst-sizes", 0xff); | 779 | bursts = of_getintprop_default(op->dev.of_node, "burst-sizes", 0xff); |
780 | bmask = of_getintprop_default(op->node->parent, "burst-sizes", 0xff); | 780 | bmask = of_getintprop_default(op->dev.of_node->parent, "burst-sizes", 0xff); |
781 | if (bmask != 0xff) | 781 | if (bmask != 0xff) |
782 | bursts &= bmask; | 782 | bursts &= bmask; |
783 | if (bursts == 0xff || | 783 | if (bursts == 0xff || |
@@ -1293,7 +1293,7 @@ static struct scsi_host_template qpti_template = { | |||
1293 | static int __devinit qpti_sbus_probe(struct of_device *op, const struct of_device_id *match) | 1293 | static int __devinit qpti_sbus_probe(struct of_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->node; | 1296 | struct device_node *dp = op->dev.of_node; |
1297 | struct Scsi_Host *host; | 1297 | struct Scsi_Host *host; |
1298 | struct qlogicpti *qpti; | 1298 | struct qlogicpti *qpti; |
1299 | static int nqptis; | 1299 | static int nqptis; |
@@ -1315,7 +1315,7 @@ static int __devinit qpti_sbus_probe(struct of_device *op, const struct of_devic | |||
1315 | qpti->qhost = host; | 1315 | qpti->qhost = host; |
1316 | qpti->op = op; | 1316 | qpti->op = op; |
1317 | qpti->qpti_id = nqptis; | 1317 | qpti->qpti_id = nqptis; |
1318 | strcpy(qpti->prom_name, op->node->name); | 1318 | strcpy(qpti->prom_name, op->dev.of_node->name); |
1319 | qpti->is_pti = strcmp(qpti->prom_name, "QLGC,isp"); | 1319 | qpti->is_pti = strcmp(qpti->prom_name, "QLGC,isp"); |
1320 | 1320 | ||
1321 | if (qpti_map_regs(qpti) < 0) | 1321 | if (qpti_map_regs(qpti) < 0) |
@@ -1456,8 +1456,11 @@ static const struct of_device_id qpti_match[] = { | |||
1456 | MODULE_DEVICE_TABLE(of, qpti_match); | 1456 | MODULE_DEVICE_TABLE(of, qpti_match); |
1457 | 1457 | ||
1458 | static struct of_platform_driver qpti_sbus_driver = { | 1458 | static struct of_platform_driver qpti_sbus_driver = { |
1459 | .name = "qpti", | 1459 | .driver = { |
1460 | .match_table = qpti_match, | 1460 | .name = "qpti", |
1461 | .owner = THIS_MODULE, | ||
1462 | .of_match_table = qpti_match, | ||
1463 | }, | ||
1461 | .probe = qpti_sbus_probe, | 1464 | .probe = qpti_sbus_probe, |
1462 | .remove = __devexit_p(qpti_sbus_remove), | 1465 | .remove = __devexit_p(qpti_sbus_remove), |
1463 | }; | 1466 | }; |
diff --git a/drivers/scsi/sun_esp.c b/drivers/scsi/sun_esp.c index fc23d273fb1a..386dd9d602b6 100644 --- a/drivers/scsi/sun_esp.c +++ b/drivers/scsi/sun_esp.c | |||
@@ -125,7 +125,7 @@ static void __devinit esp_get_scsi_id(struct esp *esp, struct of_device *espdma) | |||
125 | struct of_device *op = esp->dev; | 125 | struct of_device *op = esp->dev; |
126 | struct device_node *dp; | 126 | struct device_node *dp; |
127 | 127 | ||
128 | dp = op->node; | 128 | dp = op->dev.of_node; |
129 | esp->scsi_id = of_getintprop_default(dp, "initiator-id", 0xff); | 129 | esp->scsi_id = of_getintprop_default(dp, "initiator-id", 0xff); |
130 | if (esp->scsi_id != 0xff) | 130 | if (esp->scsi_id != 0xff) |
131 | goto done; | 131 | goto done; |
@@ -134,7 +134,7 @@ static void __devinit esp_get_scsi_id(struct esp *esp, struct of_device *espdma) | |||
134 | if (esp->scsi_id != 0xff) | 134 | if (esp->scsi_id != 0xff) |
135 | goto done; | 135 | goto done; |
136 | 136 | ||
137 | esp->scsi_id = of_getintprop_default(espdma->node, | 137 | esp->scsi_id = of_getintprop_default(espdma->dev.of_node, |
138 | "scsi-initiator-id", 7); | 138 | "scsi-initiator-id", 7); |
139 | 139 | ||
140 | done: | 140 | done: |
@@ -147,7 +147,7 @@ static void __devinit esp_get_differential(struct esp *esp) | |||
147 | struct of_device *op = esp->dev; | 147 | struct of_device *op = esp->dev; |
148 | struct device_node *dp; | 148 | struct device_node *dp; |
149 | 149 | ||
150 | dp = op->node; | 150 | dp = op->dev.of_node; |
151 | if (of_find_property(dp, "differential", NULL)) | 151 | if (of_find_property(dp, "differential", NULL)) |
152 | esp->flags |= ESP_FLAG_DIFFERENTIAL; | 152 | esp->flags |= ESP_FLAG_DIFFERENTIAL; |
153 | else | 153 | else |
@@ -160,7 +160,7 @@ static void __devinit esp_get_clock_params(struct esp *esp) | |||
160 | struct device_node *bus_dp, *dp; | 160 | struct device_node *bus_dp, *dp; |
161 | int fmhz; | 161 | int fmhz; |
162 | 162 | ||
163 | dp = op->node; | 163 | dp = op->dev.of_node; |
164 | bus_dp = dp->parent; | 164 | bus_dp = dp->parent; |
165 | 165 | ||
166 | fmhz = of_getintprop_default(dp, "clock-frequency", 0); | 166 | fmhz = of_getintprop_default(dp, "clock-frequency", 0); |
@@ -172,12 +172,12 @@ static void __devinit esp_get_clock_params(struct esp *esp) | |||
172 | 172 | ||
173 | static void __devinit esp_get_bursts(struct esp *esp, struct of_device *dma_of) | 173 | static void __devinit esp_get_bursts(struct esp *esp, struct of_device *dma_of) |
174 | { | 174 | { |
175 | struct device_node *dma_dp = dma_of->node; | 175 | struct device_node *dma_dp = dma_of->dev.of_node; |
176 | struct of_device *op = esp->dev; | 176 | struct of_device *op = esp->dev; |
177 | struct device_node *dp; | 177 | struct device_node *dp; |
178 | u8 bursts, val; | 178 | u8 bursts, val; |
179 | 179 | ||
180 | dp = op->node; | 180 | dp = op->dev.of_node; |
181 | bursts = of_getintprop_default(dp, "burst-sizes", 0xff); | 181 | bursts = of_getintprop_default(dp, "burst-sizes", 0xff); |
182 | val = of_getintprop_default(dma_dp, "burst-sizes", 0xff); | 182 | val = of_getintprop_default(dma_dp, "burst-sizes", 0xff); |
183 | if (val != 0xff) | 183 | if (val != 0xff) |
@@ -565,7 +565,7 @@ fail: | |||
565 | static int __devinit esp_sbus_probe(struct of_device *op, const struct of_device_id *match) | 565 | static int __devinit esp_sbus_probe(struct of_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->node; | 568 | struct device_node *dp = op->dev.of_node; |
569 | struct of_device *dma_of = NULL; | 569 | struct of_device *dma_of = NULL; |
570 | int hme = 0; | 570 | int hme = 0; |
571 | 571 | ||
@@ -574,7 +574,7 @@ static int __devinit esp_sbus_probe(struct of_device *op, const struct of_device | |||
574 | !strcmp(dp->parent->name, "dma"))) | 574 | !strcmp(dp->parent->name, "dma"))) |
575 | dma_node = dp->parent; | 575 | dma_node = dp->parent; |
576 | else if (!strcmp(dp->name, "SUNW,fas")) { | 576 | else if (!strcmp(dp->name, "SUNW,fas")) { |
577 | dma_node = op->node; | 577 | dma_node = op->dev.of_node; |
578 | hme = 1; | 578 | hme = 1; |
579 | } | 579 | } |
580 | if (dma_node) | 580 | if (dma_node) |
@@ -633,8 +633,11 @@ static const struct of_device_id esp_match[] = { | |||
633 | MODULE_DEVICE_TABLE(of, esp_match); | 633 | MODULE_DEVICE_TABLE(of, esp_match); |
634 | 634 | ||
635 | static struct of_platform_driver esp_sbus_driver = { | 635 | static struct of_platform_driver esp_sbus_driver = { |
636 | .name = "esp", | 636 | .driver = { |
637 | .match_table = esp_match, | 637 | .name = "esp", |
638 | .owner = THIS_MODULE, | ||
639 | .of_match_table = esp_match, | ||
640 | }, | ||
638 | .probe = esp_sbus_probe, | 641 | .probe = esp_sbus_probe, |
639 | .remove = __devexit_p(esp_sbus_remove), | 642 | .remove = __devexit_p(esp_sbus_remove), |
640 | }; | 643 | }; |