aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi
diff options
context:
space:
mode:
authorGrant Likely <grant.likely@secretlab.ca>2010-04-13 19:12:29 -0400
committerGrant Likely <grant.likely@secretlab.ca>2010-05-18 18:10:44 -0400
commit61c7a080a5a061c976988fd4b844dfb468dda255 (patch)
tree8cb492b73f2755c38a6164d770da34d5af6486a0 /drivers/scsi
parentd12d42f744f805a9ccc33cd76f04b237cd83ce56 (diff)
of: Always use 'struct device.of_node' to get device node pointer.
The following structure elements duplicate the information in 'struct device.of_node' and so are being eliminated. This patch makes all readers of these elements use device.of_node instead. (struct of_device *)->node (struct dev_archdata *)->prom_node (sparc) (struct dev_archdata *)->of_node (powerpc & microblaze) Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Diffstat (limited to 'drivers/scsi')
-rw-r--r--drivers/scsi/ibmvscsi/ibmvfc.c2
-rw-r--r--drivers/scsi/ibmvscsi/ibmvscsi.c2
-rw-r--r--drivers/scsi/qlogicpti.c10
-rw-r--r--drivers/scsi/sun_esp.c16
4 files changed, 15 insertions, 15 deletions
diff --git a/drivers/scsi/ibmvscsi/ibmvfc.c b/drivers/scsi/ibmvscsi/ibmvfc.c
index c2eea711a5ce..60cd4ec51eae 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)
1157static void ibmvfc_set_login_info(struct ibmvfc_host *vhost) 1157static 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 ff5ec5ac1fb5..cc38fefc2612 100644
--- a/drivers/scsi/ibmvscsi/ibmvscsi.c
+++ b/drivers/scsi/ibmvscsi/ibmvscsi.c
@@ -957,7 +957,7 @@ static void send_mad_capabilities(struct ibmvscsi_host_data *hostdata)
957 struct viosrp_capabilities *req; 957 struct viosrp_capabilities *req;
958 struct srp_event_struct *evt_struct; 958 struct srp_event_struct *evt_struct;
959 unsigned long flags; 959 unsigned long flags;
960 struct device_node *of_node = hostdata->dev->archdata.of_node; 960 struct device_node *of_node = hostdata->dev->of_node;
961 const char *location; 961 const char *location;
962 962
963 evt_struct = get_event_struct(&hostdata->pool); 963 evt_struct = get_event_struct(&hostdata->pool);
diff --git a/drivers/scsi/qlogicpti.c b/drivers/scsi/qlogicpti.c
index aa406497eebc..35433d23b7ce 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 = {
1293static int __devinit qpti_sbus_probe(struct of_device *op, const struct of_device_id *match) 1293static 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)
diff --git a/drivers/scsi/sun_esp.c b/drivers/scsi/sun_esp.c
index fc23d273fb1a..151df73df475 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
140done: 140done:
@@ -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
173static void __devinit esp_get_bursts(struct esp *esp, struct of_device *dma_of) 173static 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:
565static int __devinit esp_sbus_probe(struct of_device *op, const struct of_device_id *match) 565static 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)