aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorStephen Rothwell <sfr@canb.auug.org.au>2007-04-02 20:52:17 -0400
committerPaul Mackerras <paulus@samba.org>2007-04-12 13:55:17 -0400
commita7edd0e676d51145ae634a2acf7a447e319200fa (patch)
tree24047c72a067e7c670fca186d89b1b7c032e1bde /drivers
parent6c2d046980299d52d78b2738ad7f11fc593dea75 (diff)
[POWERPC] get_property returns const
This just tidies up some of the remains. Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/hwmon/ams/ams-core.c4
-rw-r--r--drivers/hwmon/ams/ams-i2c.c4
-rw-r--r--drivers/hwmon/ams/ams-pmu.c4
-rw-r--r--drivers/infiniband/hw/ehca/ehca_main.c4
-rw-r--r--drivers/net/ehea/ehea_main.c8
-rw-r--r--drivers/scsi/ibmvscsi/ibmvstgt.c4
-rw-r--r--drivers/video/aty/radeon_pm.c2
7 files changed, 15 insertions, 15 deletions
diff --git a/drivers/hwmon/ams/ams-core.c b/drivers/hwmon/ams/ams-core.c
index f1f0f5d0442c..f5ebad561412 100644
--- a/drivers/hwmon/ams/ams-core.c
+++ b/drivers/hwmon/ams/ams-core.c
@@ -141,10 +141,10 @@ static void ams_worker(struct work_struct *work)
141int ams_sensor_attach(void) 141int ams_sensor_attach(void)
142{ 142{
143 int result; 143 int result;
144 u32 *prop; 144 const u32 *prop;
145 145
146 /* Get orientation */ 146 /* Get orientation */
147 prop = (u32*)get_property(ams_info.of_node, "orientation", NULL); 147 prop = get_property(ams_info.of_node, "orientation", NULL);
148 if (!prop) 148 if (!prop)
149 return -ENODEV; 149 return -ENODEV;
150 ams_info.orient1 = *prop; 150 ams_info.orient1 = *prop;
diff --git a/drivers/hwmon/ams/ams-i2c.c b/drivers/hwmon/ams/ams-i2c.c
index 0d24bdfea53e..485d333bcb3e 100644
--- a/drivers/hwmon/ams/ams-i2c.c
+++ b/drivers/hwmon/ams/ams-i2c.c
@@ -263,7 +263,7 @@ int __init ams_i2c_init(struct device_node *np)
263{ 263{
264 char *tmp_bus; 264 char *tmp_bus;
265 int result; 265 int result;
266 u32 *prop; 266 const u32 *prop;
267 267
268 mutex_lock(&ams_info.lock); 268 mutex_lock(&ams_info.lock);
269 269
@@ -276,7 +276,7 @@ int __init ams_i2c_init(struct device_node *np)
276 ams_info.bustype = BUS_I2C; 276 ams_info.bustype = BUS_I2C;
277 277
278 /* look for bus either using "reg" or by path */ 278 /* look for bus either using "reg" or by path */
279 prop = (u32*)get_property(ams_info.of_node, "reg", NULL); 279 prop = get_property(ams_info.of_node, "reg", NULL);
280 if (!prop) { 280 if (!prop) {
281 result = -ENODEV; 281 result = -ENODEV;
282 282
diff --git a/drivers/hwmon/ams/ams-pmu.c b/drivers/hwmon/ams/ams-pmu.c
index 4636ae031a53..1b01c215bfe7 100644
--- a/drivers/hwmon/ams/ams-pmu.c
+++ b/drivers/hwmon/ams/ams-pmu.c
@@ -146,7 +146,7 @@ static void ams_pmu_exit(void)
146 146
147int __init ams_pmu_init(struct device_node *np) 147int __init ams_pmu_init(struct device_node *np)
148{ 148{
149 u32 *prop; 149 const u32 *prop;
150 int result; 150 int result;
151 151
152 mutex_lock(&ams_info.lock); 152 mutex_lock(&ams_info.lock);
@@ -160,7 +160,7 @@ int __init ams_pmu_init(struct device_node *np)
160 ams_info.bustype = BUS_HOST; 160 ams_info.bustype = BUS_HOST;
161 161
162 /* Get PMU command, should be 0x4e, but we can never know */ 162 /* Get PMU command, should be 0x4e, but we can never know */
163 prop = (u32*)get_property(ams_info.of_node, "reg", NULL); 163 prop = get_property(ams_info.of_node, "reg", NULL);
164 if (!prop) { 164 if (!prop) {
165 result = -ENODEV; 165 result = -ENODEV;
166 goto exit; 166 goto exit;
diff --git a/drivers/infiniband/hw/ehca/ehca_main.c b/drivers/infiniband/hw/ehca/ehca_main.c
index 059da9628bb5..cee66b79b30d 100644
--- a/drivers/infiniband/hw/ehca/ehca_main.c
+++ b/drivers/infiniband/hw/ehca/ehca_main.c
@@ -565,11 +565,11 @@ static int __devinit ehca_probe(struct ibmebus_dev *dev,
565 const struct of_device_id *id) 565 const struct of_device_id *id)
566{ 566{
567 struct ehca_shca *shca; 567 struct ehca_shca *shca;
568 u64 *handle; 568 const u64 *handle;
569 struct ib_pd *ibpd; 569 struct ib_pd *ibpd;
570 int ret; 570 int ret;
571 571
572 handle = (u64 *)get_property(dev->ofdev.node, "ibm,hca-handle", NULL); 572 handle = get_property(dev->ofdev.node, "ibm,hca-handle", NULL);
573 if (!handle) { 573 if (!handle) {
574 ehca_gen_err("Cannot get eHCA handle for adapter: %s.", 574 ehca_gen_err("Cannot get eHCA handle for adapter: %s.",
575 dev->ofdev.node->full_name); 575 dev->ofdev.node->full_name);
diff --git a/drivers/net/ehea/ehea_main.c b/drivers/net/ehea/ehea_main.c
index 0e4042bc0a48..d1a8134c8e31 100644
--- a/drivers/net/ehea/ehea_main.c
+++ b/drivers/net/ehea/ehea_main.c
@@ -2320,7 +2320,7 @@ static int ehea_setup_single_port(struct ehea_port *port,
2320 struct net_device *dev = port->netdev; 2320 struct net_device *dev = port->netdev;
2321 struct ehea_adapter *adapter = port->adapter; 2321 struct ehea_adapter *adapter = port->adapter;
2322 struct hcp_ehea_port_cb4 *cb4; 2322 struct hcp_ehea_port_cb4 *cb4;
2323 u32 *dn_log_port_id; 2323 const u32 *dn_log_port_id;
2324 int jumbo = 0; 2324 int jumbo = 0;
2325 2325
2326 sema_init(&port->port_lock, 1); 2326 sema_init(&port->port_lock, 1);
@@ -2336,7 +2336,7 @@ static int ehea_setup_single_port(struct ehea_port *port,
2336 port->of_dev_node = dn; 2336 port->of_dev_node = dn;
2337 2337
2338 /* Determine logical port id */ 2338 /* Determine logical port id */
2339 dn_log_port_id = (u32*)get_property(dn, "ibm,hea-port-no", NULL); 2339 dn_log_port_id = get_property(dn, "ibm,hea-port-no", NULL);
2340 2340
2341 if (!dn_log_port_id) { 2341 if (!dn_log_port_id) {
2342 ehea_error("bad device node: dn_log_port_id=%p", 2342 ehea_error("bad device node: dn_log_port_id=%p",
@@ -2492,7 +2492,7 @@ static int __devinit ehea_probe(struct ibmebus_dev *dev,
2492 const struct of_device_id *id) 2492 const struct of_device_id *id)
2493{ 2493{
2494 struct ehea_adapter *adapter; 2494 struct ehea_adapter *adapter;
2495 u64 *adapter_handle; 2495 const u64 *adapter_handle;
2496 int ret; 2496 int ret;
2497 2497
2498 adapter = kzalloc(sizeof(*adapter), GFP_KERNEL); 2498 adapter = kzalloc(sizeof(*adapter), GFP_KERNEL);
@@ -2502,7 +2502,7 @@ static int __devinit ehea_probe(struct ibmebus_dev *dev,
2502 goto out; 2502 goto out;
2503 } 2503 }
2504 2504
2505 adapter_handle = (u64*)get_property(dev->ofdev.node, "ibm,hea-handle", 2505 adapter_handle = get_property(dev->ofdev.node, "ibm,hea-handle",
2506 NULL); 2506 NULL);
2507 if (adapter_handle) 2507 if (adapter_handle)
2508 adapter->handle = *adapter_handle; 2508 adapter->handle = *adapter_handle;
diff --git a/drivers/scsi/ibmvscsi/ibmvstgt.c b/drivers/scsi/ibmvscsi/ibmvstgt.c
index 4368ca0e8270..f65f21da3fd8 100644
--- a/drivers/scsi/ibmvscsi/ibmvstgt.c
+++ b/drivers/scsi/ibmvscsi/ibmvstgt.c
@@ -897,7 +897,7 @@ static int get_system_info(void)
897{ 897{
898 struct device_node *rootdn; 898 struct device_node *rootdn;
899 const char *id, *model, *name; 899 const char *id, *model, *name;
900 unsigned int *num; 900 const unsigned int *num;
901 901
902 rootdn = find_path_device("/"); 902 rootdn = find_path_device("/");
903 if (!rootdn) 903 if (!rootdn)
@@ -912,7 +912,7 @@ static int get_system_info(void)
912 if (name) 912 if (name)
913 strncpy(partition_name, name, sizeof(partition_name)); 913 strncpy(partition_name, name, sizeof(partition_name));
914 914
915 num = (unsigned int *) get_property(rootdn, "ibm,partition-no", NULL); 915 num = get_property(rootdn, "ibm,partition-no", NULL);
916 if (num) 916 if (num)
917 partition_number = *num; 917 partition_number = *num;
918 918
diff --git a/drivers/video/aty/radeon_pm.c b/drivers/video/aty/radeon_pm.c
index 9a2b0d69b0ae..c411293cefc8 100644
--- a/drivers/video/aty/radeon_pm.c
+++ b/drivers/video/aty/radeon_pm.c
@@ -1262,7 +1262,7 @@ static void radeon_pm_full_reset_sdram(struct radeonfb_info *rinfo)
1262 /* This is the code for the Aluminium PowerBooks M10 / iBooks M11 */ 1262 /* This is the code for the Aluminium PowerBooks M10 / iBooks M11 */
1263 if (rinfo->family == CHIP_FAMILY_RV350) { 1263 if (rinfo->family == CHIP_FAMILY_RV350) {
1264 u32 sdram_mode_reg = rinfo->save_regs[35]; 1264 u32 sdram_mode_reg = rinfo->save_regs[35];
1265 static u32 default_mrtable[] = 1265 static const u32 default_mrtable[] =
1266 { 0x21320032, 1266 { 0x21320032,
1267 0x21321000, 0xa1321000, 0x21321000, 0xffffffff, 1267 0x21321000, 0xa1321000, 0x21321000, 0xffffffff,
1268 0x21320032, 0xa1320032, 0x21320032, 0xffffffff, 1268 0x21320032, 0xa1320032, 0x21320032, 0xffffffff,