diff options
| author | Trond Myklebust <Trond.Myklebust@netapp.com> | 2006-03-23 23:44:19 -0500 |
|---|---|---|
| committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2006-03-23 23:44:19 -0500 |
| commit | 1ebbe2b20091d306453a5cf480a87e6cd28ae76f (patch) | |
| tree | f5cd7a0fa69b8b1938cb5a0faed2e7b0628072a5 /drivers/char/vr41xx_giu.c | |
| parent | ac58c9059da8886b5e8cde012a80266b18ca146e (diff) | |
| parent | 674a396c6d2ba0341ebdd7c1c9950f32f018e2dd (diff) | |
Merge branch 'linus'
Diffstat (limited to 'drivers/char/vr41xx_giu.c')
| -rw-r--r-- | drivers/char/vr41xx_giu.c | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/drivers/char/vr41xx_giu.c b/drivers/char/vr41xx_giu.c index 2267c7b81799..05e6e814d86f 100644 --- a/drivers/char/vr41xx_giu.c +++ b/drivers/char/vr41xx_giu.c | |||
| @@ -613,7 +613,7 @@ static struct file_operations gpio_fops = { | |||
| 613 | .release = gpio_release, | 613 | .release = gpio_release, |
| 614 | }; | 614 | }; |
| 615 | 615 | ||
| 616 | static int giu_probe(struct platform_device *dev) | 616 | static int __devinit giu_probe(struct platform_device *dev) |
| 617 | { | 617 | { |
| 618 | unsigned long start, size, flags = 0; | 618 | unsigned long start, size, flags = 0; |
| 619 | unsigned int nr_pins = 0; | 619 | unsigned int nr_pins = 0; |
| @@ -697,7 +697,7 @@ static int giu_probe(struct platform_device *dev) | |||
| 697 | return cascade_irq(GIUINT_IRQ, giu_get_irq); | 697 | return cascade_irq(GIUINT_IRQ, giu_get_irq); |
| 698 | } | 698 | } |
| 699 | 699 | ||
| 700 | static int giu_remove(struct platform_device *dev) | 700 | static int __devexit giu_remove(struct platform_device *dev) |
| 701 | { | 701 | { |
| 702 | iounmap(giu_base); | 702 | iounmap(giu_base); |
| 703 | 703 | ||
| @@ -712,9 +712,10 @@ static struct platform_device *giu_platform_device; | |||
| 712 | 712 | ||
| 713 | static struct platform_driver giu_device_driver = { | 713 | static struct platform_driver giu_device_driver = { |
| 714 | .probe = giu_probe, | 714 | .probe = giu_probe, |
| 715 | .remove = giu_remove, | 715 | .remove = __devexit_p(giu_remove), |
| 716 | .driver = { | 716 | .driver = { |
| 717 | .name = "GIU", | 717 | .name = "GIU", |
| 718 | .owner = THIS_MODULE, | ||
| 718 | }, | 719 | }, |
| 719 | }; | 720 | }; |
| 720 | 721 | ||
| @@ -722,9 +723,15 @@ static int __init vr41xx_giu_init(void) | |||
| 722 | { | 723 | { |
| 723 | int retval; | 724 | int retval; |
| 724 | 725 | ||
| 725 | giu_platform_device = platform_device_register_simple("GIU", -1, NULL, 0); | 726 | giu_platform_device = platform_device_alloc("GIU", -1); |
| 726 | if (IS_ERR(giu_platform_device)) | 727 | if (!giu_platform_device) |
| 727 | return PTR_ERR(giu_platform_device); | 728 | return -ENOMEM; |
| 729 | |||
| 730 | retval = platform_device_add(giu_platform_device); | ||
| 731 | if (retval < 0) { | ||
| 732 | platform_device_put(giu_platform_device); | ||
| 733 | return retval; | ||
| 734 | } | ||
| 728 | 735 | ||
| 729 | retval = platform_driver_register(&giu_device_driver); | 736 | retval = platform_driver_register(&giu_device_driver); |
| 730 | if (retval < 0) | 737 | if (retval < 0) |
