aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/sbus
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/sbus')
-rw-r--r--drivers/sbus/char/Kconfig1
-rw-r--r--drivers/sbus/char/bbc_envctrl.c10
-rw-r--r--drivers/sbus/char/bbc_i2c.c4
-rw-r--r--drivers/sbus/char/jsflash.c2
-rw-r--r--drivers/sbus/char/vfc_dev.c1
-rw-r--r--drivers/sbus/sbus.c9
6 files changed, 20 insertions, 7 deletions
diff --git a/drivers/sbus/char/Kconfig b/drivers/sbus/char/Kconfig
index 35a73168333f..400c65bfb8c7 100644
--- a/drivers/sbus/char/Kconfig
+++ b/drivers/sbus/char/Kconfig
@@ -15,6 +15,7 @@ config SUN_OPENPROMIO
15 15
16config SUN_MOSTEK_RTC 16config SUN_MOSTEK_RTC
17 tristate "Mostek real time clock support" 17 tristate "Mostek real time clock support"
18 depends on SPARC32
18 help 19 help
19 The Mostek RTC chip is used on all known Sun computers except 20 The Mostek RTC chip is used on all known Sun computers except
20 some JavaStations. For a JavaStation you need to say Y both here 21 some JavaStations. For a JavaStation you need to say Y both here
diff --git a/drivers/sbus/char/bbc_envctrl.c b/drivers/sbus/char/bbc_envctrl.c
index e821a155b658..0bde26989a23 100644
--- a/drivers/sbus/char/bbc_envctrl.c
+++ b/drivers/sbus/char/bbc_envctrl.c
@@ -479,11 +479,12 @@ static int kenvctrld(void *__unused)
479 479
480static void attach_one_temp(struct linux_ebus_child *echild, int temp_idx) 480static void attach_one_temp(struct linux_ebus_child *echild, int temp_idx)
481{ 481{
482 struct bbc_cpu_temperature *tp = kmalloc(sizeof(*tp), GFP_KERNEL); 482 struct bbc_cpu_temperature *tp;
483 483
484 tp = kzalloc(sizeof(*tp), GFP_KERNEL);
484 if (!tp) 485 if (!tp)
485 return; 486 return;
486 memset(tp, 0, sizeof(*tp)); 487
487 tp->client = bbc_i2c_attach(echild); 488 tp->client = bbc_i2c_attach(echild);
488 if (!tp->client) { 489 if (!tp->client) {
489 kfree(tp); 490 kfree(tp);
@@ -525,11 +526,12 @@ static void attach_one_temp(struct linux_ebus_child *echild, int temp_idx)
525 526
526static void attach_one_fan(struct linux_ebus_child *echild, int fan_idx) 527static void attach_one_fan(struct linux_ebus_child *echild, int fan_idx)
527{ 528{
528 struct bbc_fan_control *fp = kmalloc(sizeof(*fp), GFP_KERNEL); 529 struct bbc_fan_control *fp;
529 530
531 fp = kzalloc(sizeof(*fp), GFP_KERNEL);
530 if (!fp) 532 if (!fp)
531 return; 533 return;
532 memset(fp, 0, sizeof(*fp)); 534
533 fp->client = bbc_i2c_attach(echild); 535 fp->client = bbc_i2c_attach(echild);
534 if (!fp->client) { 536 if (!fp->client) {
535 kfree(fp); 537 kfree(fp);
diff --git a/drivers/sbus/char/bbc_i2c.c b/drivers/sbus/char/bbc_i2c.c
index fbadd4d761f3..ac8ef2ce07fb 100644
--- a/drivers/sbus/char/bbc_i2c.c
+++ b/drivers/sbus/char/bbc_i2c.c
@@ -357,13 +357,13 @@ static void __init reset_one_i2c(struct bbc_i2c_bus *bp)
357 357
358static int __init attach_one_i2c(struct linux_ebus_device *edev, int index) 358static int __init attach_one_i2c(struct linux_ebus_device *edev, int index)
359{ 359{
360 struct bbc_i2c_bus *bp = kmalloc(sizeof(*bp), GFP_KERNEL); 360 struct bbc_i2c_bus *bp;
361 struct linux_ebus_child *echild; 361 struct linux_ebus_child *echild;
362 int entry; 362 int entry;
363 363
364 bp = kzalloc(sizeof(*bp), GFP_KERNEL);
364 if (!bp) 365 if (!bp)
365 return -ENOMEM; 366 return -ENOMEM;
366 memset(bp, 0, sizeof(*bp));
367 367
368 bp->i2c_control_regs = ioremap(edev->resource[0].start, 0x2); 368 bp->i2c_control_regs = ioremap(edev->resource[0].start, 0x2);
369 if (!bp->i2c_control_regs) 369 if (!bp->i2c_control_regs)
diff --git a/drivers/sbus/char/jsflash.c b/drivers/sbus/char/jsflash.c
index 5157a2abc58d..4b7079fdc10c 100644
--- a/drivers/sbus/char/jsflash.c
+++ b/drivers/sbus/char/jsflash.c
@@ -185,7 +185,7 @@ static void jsfd_read(char *buf, unsigned long p, size_t togo) {
185 } 185 }
186} 186}
187 187
188static void jsfd_do_request(request_queue_t *q) 188static void jsfd_do_request(struct request_queue *q)
189{ 189{
190 struct request *req; 190 struct request *req;
191 191
diff --git a/drivers/sbus/char/vfc_dev.c b/drivers/sbus/char/vfc_dev.c
index 26b1d2a17ed2..9269f7fbd363 100644
--- a/drivers/sbus/char/vfc_dev.c
+++ b/drivers/sbus/char/vfc_dev.c
@@ -248,6 +248,7 @@ static int vfc_debug(struct vfc_dev *dev, int cmd, void __user *argp)
248 buffer,inout.len); 248 buffer,inout.len);
249 249
250 if (copy_to_user(argp,&inout,sizeof(inout))) { 250 if (copy_to_user(argp,&inout,sizeof(inout))) {
251 vfc_unlock_device(dev);
251 kfree(buffer); 252 kfree(buffer);
252 return -EFAULT; 253 return -EFAULT;
253 } 254 }
diff --git a/drivers/sbus/sbus.c b/drivers/sbus/sbus.c
index 2553629ec15d..c37d7c2587ff 100644
--- a/drivers/sbus/sbus.c
+++ b/drivers/sbus/sbus.c
@@ -210,6 +210,10 @@ static void __init walk_children(struct device_node *dp, struct sbus_dev *parent
210 210
211 sdev->bus = sbus; 211 sdev->bus = sbus;
212 sdev->parent = parent; 212 sdev->parent = parent;
213 sdev->ofdev.dev.archdata.iommu =
214 sbus->ofdev.dev.archdata.iommu;
215 sdev->ofdev.dev.archdata.stc =
216 sbus->ofdev.dev.archdata.stc;
213 217
214 fill_sbus_device(dp, sdev); 218 fill_sbus_device(dp, sdev);
215 219
@@ -269,6 +273,11 @@ static void __init build_one_sbus(struct device_node *dp, int num_sbus)
269 273
270 sdev->bus = sbus; 274 sdev->bus = sbus;
271 sdev->parent = NULL; 275 sdev->parent = NULL;
276 sdev->ofdev.dev.archdata.iommu =
277 sbus->ofdev.dev.archdata.iommu;
278 sdev->ofdev.dev.archdata.stc =
279 sbus->ofdev.dev.archdata.stc;
280
272 fill_sbus_device(dev_dp, sdev); 281 fill_sbus_device(dev_dp, sdev);
273 282
274 walk_children(dev_dp, sdev, sbus); 283 walk_children(dev_dp, sdev, sbus);