Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 22431
b: refs/heads/master
c: d39b6cf
h: refs/heads/master
i:
  22429: 6e56f0b
  22427: 5aa4186
  22423: a450c9b
  22415: cff040d
  22399: dcd21bc
v: v3
  • Loading branch information
Dmitry Torokhov authored and Linus Torvalds committed Mar 22, 2006
1 parent 40498ff commit 327db85
Show file tree
Hide file tree
Showing 4 changed files with 49 additions and 26 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: f4a641d66c6e135dcfc861521e8008faed2411e1
refs/heads/master: d39b6cfe664079ca79ae1cfebac4725a877fd61d
19 changes: 13 additions & 6 deletions trunk/drivers/char/vr41xx_giu.c
Original file line number Diff line number Diff line change
Expand Up @@ -613,7 +613,7 @@ static struct file_operations gpio_fops = {
.release = gpio_release,
};

static int giu_probe(struct platform_device *dev)
static int __devinit giu_probe(struct platform_device *dev)
{
unsigned long start, size, flags = 0;
unsigned int nr_pins = 0;
Expand Down Expand Up @@ -697,7 +697,7 @@ static int giu_probe(struct platform_device *dev)
return cascade_irq(GIUINT_IRQ, giu_get_irq);
}

static int giu_remove(struct platform_device *dev)
static int __devexit giu_remove(struct platform_device *dev)
{
iounmap(giu_base);

Expand All @@ -712,19 +712,26 @@ static struct platform_device *giu_platform_device;

static struct platform_driver giu_device_driver = {
.probe = giu_probe,
.remove = giu_remove,
.remove = __devexit_p(giu_remove),
.driver = {
.name = "GIU",
.owner = THIS_MODULE,
},
};

static int __init vr41xx_giu_init(void)
{
int retval;

giu_platform_device = platform_device_register_simple("GIU", -1, NULL, 0);
if (IS_ERR(giu_platform_device))
return PTR_ERR(giu_platform_device);
giu_platform_device = platform_device_alloc("GIU", -1);
if (!giu_platform_device)
return -ENOMEM;

retval = platform_device_add(giu_platform_device);
if (retval < 0) {
platform_device_put(giu_platform_device);
return retval;
}

retval = platform_driver_register(&giu_device_driver);
if (retval < 0)
Expand Down
30 changes: 20 additions & 10 deletions trunk/drivers/char/vr41xx_rtc.c
Original file line number Diff line number Diff line change
Expand Up @@ -558,7 +558,7 @@ static struct miscdevice rtc_miscdevice = {
.fops = &rtc_fops,
};

static int rtc_probe(struct platform_device *pdev)
static int __devinit rtc_probe(struct platform_device *pdev)
{
unsigned int irq;
int retval;
Expand Down Expand Up @@ -631,7 +631,7 @@ static int rtc_probe(struct platform_device *pdev)
return 0;
}

static int rtc_remove(struct platform_device *dev)
static int __devexit rtc_remove(struct platform_device *dev)
{
int retval;

Expand All @@ -653,13 +653,14 @@ static struct platform_device *rtc_platform_device;

static struct platform_driver rtc_device_driver = {
.probe = rtc_probe,
.remove = rtc_remove,
.remove = __devexit_p(rtc_remove),
.driver = {
.name = rtc_name,
.owner = THIS_MODULE,
},
};

static int __devinit vr41xx_rtc_init(void)
static int __init vr41xx_rtc_init(void)
{
int retval;

Expand All @@ -684,10 +685,20 @@ static int __devinit vr41xx_rtc_init(void)
break;
}

rtc_platform_device = platform_device_register_simple("RTC", -1,
rtc_resource, ARRAY_SIZE(rtc_resource));
if (IS_ERR(rtc_platform_device))
return PTR_ERR(rtc_platform_device);
rtc_platform_device = platform_device_alloc("RTC", -1);
if (!rtc_platform_device)
return -ENOMEM;

retval = platform_device_add_resources(rtc_platform_device,
rtc_resource, ARRAY_SIZE(rtc_resource));

if (retval == 0)
retval = platform_device_add(rtc_platform_device);

if (retval < 0) {
platform_device_put(rtc_platform_device);
return retval;
}

retval = platform_driver_register(&rtc_device_driver);
if (retval < 0)
Expand All @@ -696,10 +707,9 @@ static int __devinit vr41xx_rtc_init(void)
return retval;
}

static void __devexit vr41xx_rtc_exit(void)
static void __exit vr41xx_rtc_exit(void)
{
platform_driver_unregister(&rtc_device_driver);

platform_device_unregister(rtc_platform_device);
}

Expand Down
24 changes: 15 additions & 9 deletions trunk/drivers/serial/vr41xx_siu.c
Original file line number Diff line number Diff line change
Expand Up @@ -919,7 +919,7 @@ static struct uart_driver siu_uart_driver = {
.cons = SERIAL_VR41XX_CONSOLE,
};

static int siu_probe(struct platform_device *dev)
static int __devinit siu_probe(struct platform_device *dev)
{
struct uart_port *port;
int num, i, retval;
Expand Down Expand Up @@ -953,7 +953,7 @@ static int siu_probe(struct platform_device *dev)
return 0;
}

static int siu_remove(struct platform_device *dev)
static int __devexit siu_remove(struct platform_device *dev)
{
struct uart_port *port;
int i;
Expand Down Expand Up @@ -1006,21 +1006,28 @@ static struct platform_device *siu_platform_device;

static struct platform_driver siu_device_driver = {
.probe = siu_probe,
.remove = siu_remove,
.remove = __devexit_p(siu_remove),
.suspend = siu_suspend,
.resume = siu_resume,
.driver = {
.name = "SIU",
.owner = THIS_MODULE,
},
};

static int __devinit vr41xx_siu_init(void)
static int __init vr41xx_siu_init(void)
{
int retval;

siu_platform_device = platform_device_register_simple("SIU", -1, NULL, 0);
if (IS_ERR(siu_platform_device))
return PTR_ERR(siu_platform_device);
siu_platform_device = platform_device_alloc("SIU", -1);
if (!siu_platform_device)
return -ENOMEM;

retval = platform_device_add(siu_platform_device);
if (retval < 0) {
platform_device_put(siu_platform_device);
return retval;
}

retval = platform_driver_register(&siu_device_driver);
if (retval < 0)
Expand All @@ -1029,10 +1036,9 @@ static int __devinit vr41xx_siu_init(void)
return retval;
}

static void __devexit vr41xx_siu_exit(void)
static void __exit vr41xx_siu_exit(void)
{
platform_driver_unregister(&siu_device_driver);

platform_device_unregister(siu_platform_device);
}

Expand Down

0 comments on commit 327db85

Please sign in to comment.