diff options
author | Florian Fainelli <florian@openwrt.org> | 2007-11-01 17:11:16 +0000 |
---|---|---|
committer | Florian Fainelli <florian@openwrt.org> | 2007-11-01 17:11:16 +0000 |
commit | 647541a1a0f6e333f1ccad1a49eeb62937edfef8 (patch) | |
tree | ccb955358a88cb96f81b22d7af00a952dc87595f /target/linux/adm5120/files/drivers/block/rb1xx/bdev.c | |
parent | 772c6488da203a2d3af523cc3b4a2378a2a1ae12 (diff) | |
download | master-31e0f0ae-647541a1a0f6e333f1ccad1a49eeb62937edfef8.tar.gz master-31e0f0ae-647541a1a0f6e333f1ccad1a49eeb62937edfef8.tar.bz2 master-31e0f0ae-647541a1a0f6e333f1ccad1a49eeb62937edfef8.zip |
CF driver cleanup
SVN-Revision: 9473
Diffstat (limited to 'target/linux/adm5120/files/drivers/block/rb1xx/bdev.c')
-rw-r--r-- | target/linux/adm5120/files/drivers/block/rb1xx/bdev.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/target/linux/adm5120/files/drivers/block/rb1xx/bdev.c b/target/linux/adm5120/files/drivers/block/rb1xx/bdev.c index 12c938505b..bf63d206b1 100644 --- a/target/linux/adm5120/files/drivers/block/rb1xx/bdev.c +++ b/target/linux/adm5120/files/drivers/block/rb1xx/bdev.c @@ -93,10 +93,10 @@ int cf_mips_probe(struct platform_device *pdev) return reg_result; } - dev = (struct cf_mips_dev *)kmalloc(sizeof(struct cf_mips_dev),GFP_KERNEL); + dev = (struct cf_mips_dev *)kzalloc(sizeof(struct cf_mips_dev),GFP_KERNEL); if (!dev) goto out_err; - memset(dev, 0, sizeof(struct cf_mips_dev)); + cdev->dev = dev; dev->pin = cdev->gpio_pin; @@ -104,8 +104,9 @@ int cf_mips_probe(struct platform_device *pdev) r = platform_get_resource_byname(pdev, IORESOURCE_MEM, "cf_membase"); dev->base = (void *) r->start; - if (cf_init(dev)) goto out_err; - printk("init done"); + if (cf_init(dev)) + goto out_err; + printk(KERN_INFO "cf-mips: init done"); spin_lock_init(&dev->lock); dev->queue = blk_init_queue(cf_request,&dev->lock); @@ -125,7 +126,9 @@ int cf_mips_probe(struct platform_device *pdev) dev->gd = alloc_disk(CF_MAX_PART); cf_gendisk = dev->gd; cdev->gd = dev->gd; - if (!cf_gendisk) goto out_err; /* Last of these goto's */ + + if (!cf_gendisk) + goto out_err; /* Last of these goto's */ cf_gendisk->major = MAJOR_NR; cf_gendisk->first_minor = 0; |