diff options
author | Grant Likely <grant.likely@secretlab.ca> | 2010-04-13 19:12:29 -0400 |
---|---|---|
committer | Grant Likely <grant.likely@secretlab.ca> | 2010-05-18 18:10:44 -0400 |
commit | 61c7a080a5a061c976988fd4b844dfb468dda255 (patch) | |
tree | 8cb492b73f2755c38a6164d770da34d5af6486a0 /sound | |
parent | d12d42f744f805a9ccc33cd76f04b237cd83ce56 (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 'sound')
-rw-r--r-- | sound/aoa/fabrics/layout.c | 2 | ||||
-rw-r--r-- | sound/aoa/soundbus/core.c | 8 | ||||
-rw-r--r-- | sound/aoa/soundbus/i2sbus/control.c | 2 | ||||
-rw-r--r-- | sound/aoa/soundbus/i2sbus/core.c | 4 | ||||
-rw-r--r-- | sound/aoa/soundbus/sysfs.c | 4 | ||||
-rw-r--r-- | sound/soc/fsl/mpc5200_dma.c | 6 | ||||
-rw-r--r-- | sound/soc/fsl/mpc5200_psc_i2s.c | 2 | ||||
-rw-r--r-- | sound/soc/fsl/mpc8610_hpcd.c | 2 | ||||
-rw-r--r-- | sound/sparc/cs4231.c | 6 | ||||
-rw-r--r-- | sound/sparc/dbri.c | 2 |
10 files changed, 19 insertions, 19 deletions
diff --git a/sound/aoa/fabrics/layout.c b/sound/aoa/fabrics/layout.c index 1cd9b301df03..3fd1a7e24928 100644 --- a/sound/aoa/fabrics/layout.c +++ b/sound/aoa/fabrics/layout.c | |||
@@ -992,7 +992,7 @@ static int aoa_fabric_layout_probe(struct soundbus_dev *sdev) | |||
992 | return -ENODEV; | 992 | return -ENODEV; |
993 | 993 | ||
994 | /* by breaking out we keep a reference */ | 994 | /* by breaking out we keep a reference */ |
995 | while ((sound = of_get_next_child(sdev->ofdev.node, sound))) { | 995 | while ((sound = of_get_next_child(sdev->ofdev.dev.of_node, sound))) { |
996 | if (sound->type && strcasecmp(sound->type, "soundchip") == 0) | 996 | if (sound->type && strcasecmp(sound->type, "soundchip") == 0) |
997 | break; | 997 | break; |
998 | } | 998 | } |
diff --git a/sound/aoa/soundbus/core.c b/sound/aoa/soundbus/core.c index fa8ab2815a98..99ca7120e269 100644 --- a/sound/aoa/soundbus/core.c +++ b/sound/aoa/soundbus/core.c | |||
@@ -74,11 +74,11 @@ static int soundbus_uevent(struct device *dev, struct kobj_uevent_env *env) | |||
74 | of = &soundbus_dev->ofdev; | 74 | of = &soundbus_dev->ofdev; |
75 | 75 | ||
76 | /* stuff we want to pass to /sbin/hotplug */ | 76 | /* stuff we want to pass to /sbin/hotplug */ |
77 | retval = add_uevent_var(env, "OF_NAME=%s", of->node->name); | 77 | retval = add_uevent_var(env, "OF_NAME=%s", of->dev.of_node->name); |
78 | if (retval) | 78 | if (retval) |
79 | return retval; | 79 | return retval; |
80 | 80 | ||
81 | retval = add_uevent_var(env, "OF_TYPE=%s", of->node->type); | 81 | retval = add_uevent_var(env, "OF_TYPE=%s", of->dev.of_node->type); |
82 | if (retval) | 82 | if (retval) |
83 | return retval; | 83 | return retval; |
84 | 84 | ||
@@ -86,7 +86,7 @@ static int soundbus_uevent(struct device *dev, struct kobj_uevent_env *env) | |||
86 | * it's not really legal to split it out with commas. We split it | 86 | * it's not really legal to split it out with commas. We split it |
87 | * up using a number of environment variables instead. */ | 87 | * up using a number of environment variables instead. */ |
88 | 88 | ||
89 | compat = of_get_property(of->node, "compatible", &cplen); | 89 | compat = of_get_property(of->dev.of_node, "compatible", &cplen); |
90 | while (compat && cplen > 0) { | 90 | while (compat && cplen > 0) { |
91 | int tmp = env->buflen; | 91 | int tmp = env->buflen; |
92 | retval = add_uevent_var(env, "OF_COMPATIBLE_%d=%s", seen, compat); | 92 | retval = add_uevent_var(env, "OF_COMPATIBLE_%d=%s", seen, compat); |
@@ -169,7 +169,7 @@ int soundbus_add_one(struct soundbus_dev *dev) | |||
169 | 169 | ||
170 | /* sanity checks */ | 170 | /* sanity checks */ |
171 | if (!dev->attach_codec || | 171 | if (!dev->attach_codec || |
172 | !dev->ofdev.node || | 172 | !dev->ofdev.dev.of_node || |
173 | dev->pcmname || | 173 | dev->pcmname || |
174 | dev->pcmid != -1) { | 174 | dev->pcmid != -1) { |
175 | printk(KERN_ERR "soundbus: adding device failed sanity check!\n"); | 175 | printk(KERN_ERR "soundbus: adding device failed sanity check!\n"); |
diff --git a/sound/aoa/soundbus/i2sbus/control.c b/sound/aoa/soundbus/i2sbus/control.c index 47f854c2001f..4dc9b49c02cf 100644 --- a/sound/aoa/soundbus/i2sbus/control.c +++ b/sound/aoa/soundbus/i2sbus/control.c | |||
@@ -42,7 +42,7 @@ int i2sbus_control_add_dev(struct i2sbus_control *c, | |||
42 | { | 42 | { |
43 | struct device_node *np; | 43 | struct device_node *np; |
44 | 44 | ||
45 | np = i2sdev->sound.ofdev.node; | 45 | np = i2sdev->sound.ofdev.dev.of_node; |
46 | i2sdev->enable = pmf_find_function(np, "enable"); | 46 | i2sdev->enable = pmf_find_function(np, "enable"); |
47 | i2sdev->cell_enable = pmf_find_function(np, "cell-enable"); | 47 | i2sdev->cell_enable = pmf_find_function(np, "cell-enable"); |
48 | i2sdev->clock_enable = pmf_find_function(np, "clock-enable"); | 48 | i2sdev->clock_enable = pmf_find_function(np, "clock-enable"); |
diff --git a/sound/aoa/soundbus/i2sbus/core.c b/sound/aoa/soundbus/i2sbus/core.c index 9d6f3b176ed1..7672b4d145ae 100644 --- a/sound/aoa/soundbus/i2sbus/core.c +++ b/sound/aoa/soundbus/i2sbus/core.c | |||
@@ -221,8 +221,8 @@ static int i2sbus_add_dev(struct macio_dev *macio, | |||
221 | 221 | ||
222 | mutex_init(&dev->lock); | 222 | mutex_init(&dev->lock); |
223 | spin_lock_init(&dev->low_lock); | 223 | spin_lock_init(&dev->low_lock); |
224 | dev->sound.ofdev.node = np; | ||
225 | dev->sound.ofdev.dma_mask = macio->ofdev.dma_mask; | 224 | dev->sound.ofdev.dma_mask = macio->ofdev.dma_mask; |
225 | dev->sound.ofdev.dev.of_node = np; | ||
226 | dev->sound.ofdev.dev.dma_mask = &dev->sound.ofdev.dma_mask; | 226 | dev->sound.ofdev.dev.dma_mask = &dev->sound.ofdev.dma_mask; |
227 | dev->sound.ofdev.dev.parent = &macio->ofdev.dev; | 227 | dev->sound.ofdev.dev.parent = &macio->ofdev.dev; |
228 | dev->sound.ofdev.dev.release = i2sbus_release_dev; | 228 | dev->sound.ofdev.dev.release = i2sbus_release_dev; |
@@ -346,7 +346,7 @@ static int i2sbus_probe(struct macio_dev* dev, const struct of_device_id *match) | |||
346 | return -ENODEV; | 346 | return -ENODEV; |
347 | } | 347 | } |
348 | 348 | ||
349 | while ((np = of_get_next_child(dev->ofdev.node, np))) { | 349 | while ((np = of_get_next_child(dev->ofdev.dev.of_node, np))) { |
350 | if (of_device_is_compatible(np, "i2sbus") || | 350 | if (of_device_is_compatible(np, "i2sbus") || |
351 | of_device_is_compatible(np, "i2s-modem")) { | 351 | of_device_is_compatible(np, "i2s-modem")) { |
352 | got += i2sbus_add_dev(dev, control, np); | 352 | got += i2sbus_add_dev(dev, control, np); |
diff --git a/sound/aoa/soundbus/sysfs.c b/sound/aoa/soundbus/sysfs.c index f580942b5c09..6496e754f00a 100644 --- a/sound/aoa/soundbus/sysfs.c +++ b/sound/aoa/soundbus/sysfs.c | |||
@@ -9,7 +9,7 @@ field##_show (struct device *dev, struct device_attribute *attr, \ | |||
9 | char *buf) \ | 9 | char *buf) \ |
10 | { \ | 10 | { \ |
11 | struct soundbus_dev *mdev = to_soundbus_device (dev); \ | 11 | struct soundbus_dev *mdev = to_soundbus_device (dev); \ |
12 | return sprintf (buf, format_string, mdev->ofdev.node->field); \ | 12 | return sprintf (buf, format_string, mdev->ofdev.dev.of_node->field); \ |
13 | } | 13 | } |
14 | 14 | ||
15 | static ssize_t modalias_show(struct device *dev, struct device_attribute *attr, | 15 | static ssize_t modalias_show(struct device *dev, struct device_attribute *attr, |
@@ -25,7 +25,7 @@ static ssize_t modalias_show(struct device *dev, struct device_attribute *attr, | |||
25 | length = strlen(buf); | 25 | length = strlen(buf); |
26 | } else { | 26 | } else { |
27 | length = sprintf(buf, "of:N%sT%s\n", | 27 | length = sprintf(buf, "of:N%sT%s\n", |
28 | of->node->name, of->node->type); | 28 | of->dev.of_node->name, of->dev.of_node->type); |
29 | } | 29 | } |
30 | 30 | ||
31 | return length; | 31 | return length; |
diff --git a/sound/soc/fsl/mpc5200_dma.c b/sound/soc/fsl/mpc5200_dma.c index d639e55c5124..1d4e7164e80a 100644 --- a/sound/soc/fsl/mpc5200_dma.c +++ b/sound/soc/fsl/mpc5200_dma.c | |||
@@ -380,8 +380,8 @@ int mpc5200_audio_dma_create(struct of_device *op) | |||
380 | int ret; | 380 | int ret; |
381 | 381 | ||
382 | /* Fetch the registers and IRQ of the PSC */ | 382 | /* Fetch the registers and IRQ of the PSC */ |
383 | irq = irq_of_parse_and_map(op->node, 0); | 383 | irq = irq_of_parse_and_map(op->dev.of_node, 0); |
384 | if (of_address_to_resource(op->node, 0, &res)) { | 384 | if (of_address_to_resource(op->dev.of_node, 0, &res)) { |
385 | dev_err(&op->dev, "Missing reg property\n"); | 385 | dev_err(&op->dev, "Missing reg property\n"); |
386 | return -ENODEV; | 386 | return -ENODEV; |
387 | } | 387 | } |
@@ -399,7 +399,7 @@ int mpc5200_audio_dma_create(struct of_device *op) | |||
399 | } | 399 | } |
400 | 400 | ||
401 | /* Get the PSC ID */ | 401 | /* Get the PSC ID */ |
402 | prop = of_get_property(op->node, "cell-index", &size); | 402 | prop = of_get_property(op->dev.of_node, "cell-index", &size); |
403 | if (!prop || size < sizeof *prop) { | 403 | if (!prop || size < sizeof *prop) { |
404 | ret = -ENODEV; | 404 | ret = -ENODEV; |
405 | goto out_free; | 405 | goto out_free; |
diff --git a/sound/soc/fsl/mpc5200_psc_i2s.c b/sound/soc/fsl/mpc5200_psc_i2s.c index ce8de90fb94a..748cc0f0df38 100644 --- a/sound/soc/fsl/mpc5200_psc_i2s.c +++ b/sound/soc/fsl/mpc5200_psc_i2s.c | |||
@@ -181,7 +181,7 @@ static int __devinit psc_i2s_of_probe(struct of_device *op, | |||
181 | 181 | ||
182 | /* Check for the codec handle. If it is not present then we | 182 | /* Check for the codec handle. If it is not present then we |
183 | * are done */ | 183 | * are done */ |
184 | if (!of_get_property(op->node, "codec-handle", NULL)) | 184 | if (!of_get_property(op->dev.of_node, "codec-handle", NULL)) |
185 | return 0; | 185 | return 0; |
186 | 186 | ||
187 | /* Due to errata in the dma mode; need to line up enabling | 187 | /* Due to errata in the dma mode; need to line up enabling |
diff --git a/sound/soc/fsl/mpc8610_hpcd.c b/sound/soc/fsl/mpc8610_hpcd.c index 83de1c81c8c4..e3f78f255a60 100644 --- a/sound/soc/fsl/mpc8610_hpcd.c +++ b/sound/soc/fsl/mpc8610_hpcd.c | |||
@@ -203,7 +203,7 @@ static struct snd_soc_ops mpc8610_hpcd_ops = { | |||
203 | static int mpc8610_hpcd_probe(struct of_device *ofdev, | 203 | static int mpc8610_hpcd_probe(struct of_device *ofdev, |
204 | const struct of_device_id *match) | 204 | const struct of_device_id *match) |
205 | { | 205 | { |
206 | struct device_node *np = ofdev->node; | 206 | struct device_node *np = ofdev->dev.of_node; |
207 | struct device_node *codec_np = NULL; | 207 | struct device_node *codec_np = NULL; |
208 | struct device_node *guts_np = NULL; | 208 | struct device_node *guts_np = NULL; |
209 | struct device_node *dma_np = NULL; | 209 | struct device_node *dma_np = NULL; |
diff --git a/sound/sparc/cs4231.c b/sound/sparc/cs4231.c index 7dcc06512e86..6a4c872e00df 100644 --- a/sound/sparc/cs4231.c +++ b/sound/sparc/cs4231.c | |||
@@ -2075,12 +2075,12 @@ static int __devinit cs4231_ebus_probe(struct of_device *op, const struct of_dev | |||
2075 | static int __devinit cs4231_probe(struct of_device *op, const struct of_device_id *match) | 2075 | static int __devinit cs4231_probe(struct of_device *op, const struct of_device_id *match) |
2076 | { | 2076 | { |
2077 | #ifdef EBUS_SUPPORT | 2077 | #ifdef EBUS_SUPPORT |
2078 | if (!strcmp(op->node->parent->name, "ebus")) | 2078 | if (!strcmp(op->dev.of_node->parent->name, "ebus")) |
2079 | return cs4231_ebus_probe(op, match); | 2079 | return cs4231_ebus_probe(op, match); |
2080 | #endif | 2080 | #endif |
2081 | #ifdef SBUS_SUPPORT | 2081 | #ifdef SBUS_SUPPORT |
2082 | if (!strcmp(op->node->parent->name, "sbus") || | 2082 | if (!strcmp(op->dev.of_node->parent->name, "sbus") || |
2083 | !strcmp(op->node->parent->name, "sbi")) | 2083 | !strcmp(op->dev.of_node->parent->name, "sbi")) |
2084 | return cs4231_sbus_probe(op, match); | 2084 | return cs4231_sbus_probe(op, match); |
2085 | #endif | 2085 | #endif |
2086 | return -ENODEV; | 2086 | return -ENODEV; |
diff --git a/sound/sparc/dbri.c b/sound/sparc/dbri.c index 2eab6ce48852..1b5192eb5ae5 100644 --- a/sound/sparc/dbri.c +++ b/sound/sparc/dbri.c | |||
@@ -2651,7 +2651,7 @@ static int __devinit dbri_probe(struct of_device *op, const struct of_device_id | |||
2651 | 2651 | ||
2652 | printk(KERN_INFO "audio%d at %p (irq %d) is DBRI(%c)+CS4215(%d)\n", | 2652 | printk(KERN_INFO "audio%d at %p (irq %d) is DBRI(%c)+CS4215(%d)\n", |
2653 | dev, dbri->regs, | 2653 | dev, dbri->regs, |
2654 | dbri->irq, op->node->name[9], dbri->mm.version); | 2654 | dbri->irq, op->dev.of_node->name[9], dbri->mm.version); |
2655 | dev++; | 2655 | dev++; |
2656 | 2656 | ||
2657 | return 0; | 2657 | return 0; |