aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kernel/vio.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/powerpc/kernel/vio.c')
-rw-r--r--arch/powerpc/kernel/vio.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/arch/powerpc/kernel/vio.c b/arch/powerpc/kernel/vio.c
index fad8580f9081..cb87e71eec66 100644
--- a/arch/powerpc/kernel/vio.c
+++ b/arch/powerpc/kernel/vio.c
@@ -77,7 +77,7 @@ static struct iommu_table *vio_build_iommu_table(struct vio_dev *dev)
77 } else 77 } else
78#endif 78#endif
79 { 79 {
80 unsigned char *dma_window; 80 const unsigned char *dma_window;
81 struct iommu_table *tbl; 81 struct iommu_table *tbl;
82 unsigned long offset, size; 82 unsigned long offset, size;
83 83
@@ -217,7 +217,7 @@ static void __devinit vio_dev_release(struct device *dev)
217struct vio_dev * __devinit vio_register_device_node(struct device_node *of_node) 217struct vio_dev * __devinit vio_register_device_node(struct device_node *of_node)
218{ 218{
219 struct vio_dev *viodev; 219 struct vio_dev *viodev;
220 unsigned int *unit_address; 220 const unsigned int *unit_address;
221 221
222 /* we need the 'device_type' property, in order to match with drivers */ 222 /* we need the 'device_type' property, in order to match with drivers */
223 if (of_node->type == NULL) { 223 if (of_node->type == NULL) {
@@ -227,7 +227,7 @@ struct vio_dev * __devinit vio_register_device_node(struct device_node *of_node)
227 return NULL; 227 return NULL;
228 } 228 }
229 229
230 unit_address = (unsigned int *)get_property(of_node, "reg", NULL); 230 unit_address = get_property(of_node, "reg", NULL);
231 if (unit_address == NULL) { 231 if (unit_address == NULL) {
232 printk(KERN_WARNING "%s: node %s missing 'reg'\n", 232 printk(KERN_WARNING "%s: node %s missing 'reg'\n",
233 __FUNCTION__, 233 __FUNCTION__,
@@ -249,7 +249,7 @@ struct vio_dev * __devinit vio_register_device_node(struct device_node *of_node)
249 viodev->type = of_node->type; 249 viodev->type = of_node->type;
250 viodev->unit_address = *unit_address; 250 viodev->unit_address = *unit_address;
251 if (firmware_has_feature(FW_FEATURE_ISERIES)) { 251 if (firmware_has_feature(FW_FEATURE_ISERIES)) {
252 unit_address = (unsigned int *)get_property(of_node, 252 unit_address = get_property(of_node,
253 "linux,unit_address", NULL); 253 "linux,unit_address", NULL);
254 if (unit_address != NULL) 254 if (unit_address != NULL)
255 viodev->unit_address = *unit_address; 255 viodev->unit_address = *unit_address;
@@ -423,7 +423,7 @@ static int vio_hotplug(struct device *dev, char **envp, int num_envp,
423{ 423{
424 const struct vio_dev *vio_dev = to_vio_dev(dev); 424 const struct vio_dev *vio_dev = to_vio_dev(dev);
425 struct device_node *dn = dev->platform_data; 425 struct device_node *dn = dev->platform_data;
426 char *cp; 426 const char *cp;
427 int length; 427 int length;
428 428
429 if (!num_envp) 429 if (!num_envp)
@@ -431,7 +431,7 @@ static int vio_hotplug(struct device *dev, char **envp, int num_envp,
431 431
432 if (!dn) 432 if (!dn)
433 return -ENODEV; 433 return -ENODEV;
434 cp = (char *)get_property(dn, "compatible", &length); 434 cp = get_property(dn, "compatible", &length);
435 if (!cp) 435 if (!cp)
436 return -ENODEV; 436 return -ENODEV;
437 437
@@ -493,11 +493,11 @@ static struct vio_dev *vio_find_name(const char *kobj_name)
493 */ 493 */
494struct vio_dev *vio_find_node(struct device_node *vnode) 494struct vio_dev *vio_find_node(struct device_node *vnode)
495{ 495{
496 uint32_t *unit_address; 496 const uint32_t *unit_address;
497 char kobj_name[BUS_ID_SIZE]; 497 char kobj_name[BUS_ID_SIZE];
498 498
499 /* construct the kobject name from the device node */ 499 /* construct the kobject name from the device node */
500 unit_address = (uint32_t *)get_property(vnode, "reg", NULL); 500 unit_address = get_property(vnode, "reg", NULL);
501 if (!unit_address) 501 if (!unit_address)
502 return NULL; 502 return NULL;
503 snprintf(kobj_name, BUS_ID_SIZE, "%x", *unit_address); 503 snprintf(kobj_name, BUS_ID_SIZE, "%x", *unit_address);