]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/arm/mach-integrator/impd1.c
arm: bus_id -> dev_name() and dev_set_name() conversions
[linux-2.6-omap-h63xx.git] / arch / arm / mach-integrator / impd1.c
index a85d471c5bfaf0d8e064f7a9dfc59ae8c2abccea..5a1588cf8242a2cea12e98bef963eb2dc065ad53 100644 (file)
@@ -355,12 +355,11 @@ static int impd1_probe(struct lm_device *dev)
        if (!request_mem_region(dev->resource.start, SZ_4K, "LM registers"))
                return -EBUSY;
 
-       impd1 = kmalloc(sizeof(struct impd1_module), GFP_KERNEL);
+       impd1 = kzalloc(sizeof(struct impd1_module), GFP_KERNEL);
        if (!impd1) {
                ret = -ENOMEM;
                goto release_lm;
        }
-       memset(impd1, 0, sizeof(struct impd1_module));
 
        impd1->base = ioremap(dev->resource.start, SZ_4K);
        if (!impd1->base) {
@@ -370,7 +369,8 @@ static int impd1_probe(struct lm_device *dev)
 
        lm_set_drvdata(dev, impd1);
 
-       printk("IM-PD1 found at 0x%08lx\n", dev->resource.start);
+       printk("IM-PD1 found at 0x%08lx\n",
+               (unsigned long)dev->resource.start);
 
        for (i = 0; i < ARRAY_SIZE(impd1->vcos); i++) {
                impd1->vcos[i].owner = THIS_MODULE,
@@ -389,15 +389,11 @@ static int impd1_probe(struct lm_device *dev)
 
                pc_base = dev->resource.start + idev->offset;
 
-               d = kmalloc(sizeof(struct amba_device), GFP_KERNEL);
+               d = kzalloc(sizeof(struct amba_device), GFP_KERNEL);
                if (!d)
                        continue;
 
-               memset(d, 0, sizeof(struct amba_device));
-
-               snprintf(d->dev.bus_id, sizeof(d->dev.bus_id),
-                        "lm%x:%5.5lx", dev->id, idev->offset >> 12);
-
+               dev_set_name(&d->dev, "lm%x:%5.5lx", dev->id, idev->offset >> 12);
                d->dev.parent   = &dev->dev;
                d->res.start    = dev->resource.start + idev->offset;
                d->res.end      = d->res.start + SZ_4K - 1;
@@ -409,8 +405,7 @@ static int impd1_probe(struct lm_device *dev)
 
                ret = amba_device_register(d, &dev->resource);
                if (ret) {
-                       printk("unable to register device %s: %d\n",
-                               d->dev.bus_id, ret);
+                       dev_err(&d->dev, "unable to register device: %d\n");
                        kfree(d);
                }
        }