aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/sun_esp.c
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/sun_esp.c
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/sun_esp.c')
-rw-r--r--drivers/scsi/sun_esp.c16
1 files changed, 8 insertions, 8 deletions
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)