aboutsummaryrefslogtreecommitdiff
path: root/drivers/video/arcfb.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/video/arcfb.c')
-rw-r--r--drivers/video/arcfb.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/drivers/video/arcfb.c b/drivers/video/arcfb.c
index a1fc8bbb1090..080db812ca48 100644
--- a/drivers/video/arcfb.c
+++ b/drivers/video/arcfb.c
@@ -514,9 +514,8 @@ static struct fb_ops arcfb_ops = {
.fb_ioctl = arcfb_ioctl,
};
-static int __init arcfb_probe(struct device *device)
+static int __init arcfb_probe(struct platform_device *dev)
{
- struct platform_device *dev = to_platform_device(device);
struct fb_info *info;
int retval = -ENOMEM;
int videomemorysize;
@@ -559,7 +558,7 @@ static int __init arcfb_probe(struct device *device)
retval = register_framebuffer(info);
if (retval < 0)
goto err1;
- dev_set_drvdata(&dev->dev, info);
+ platform_set_drvdata(dev, info);
if (irq) {
par->irq = irq;
if (request_irq(par->irq, &arcfb_interrupt, SA_SHIRQ,
@@ -600,9 +599,9 @@ err:
return retval;
}
-static int arcfb_remove(struct device *device)
+static int arcfb_remove(struct platform_device *dev)
{
- struct fb_info *info = dev_get_drvdata(device);
+ struct fb_info *info = platform_get_drvdata(dev);
if (info) {
unregister_framebuffer(info);
@@ -612,11 +611,12 @@ static int arcfb_remove(struct device *device)
return 0;
}
-static struct device_driver arcfb_driver = {
- .name = "arcfb",
- .bus = &platform_bus_type,
+static struct platform_driver arcfb_driver = {
.probe = arcfb_probe,
.remove = arcfb_remove,
+ .driver = {
+ .name = "arcfb",
+ },
};
static struct platform_device *arcfb_device;
@@ -628,7 +628,7 @@ static int __init arcfb_init(void)
if (!arcfb_enable)
return -ENXIO;
- ret = driver_register(&arcfb_driver);
+ ret = platform_driver_register(&arcfb_driver);
if (!ret) {
arcfb_device = platform_device_alloc("arcfb", 0);
if (arcfb_device) {
@@ -638,7 +638,7 @@ static int __init arcfb_init(void)
}
if (ret) {
platform_device_put(arcfb_device);
- driver_unregister(&arcfb_driver);
+ platform_driver_unregister(&arcfb_driver);
}
}
return ret;
@@ -648,7 +648,7 @@ static int __init arcfb_init(void)
static void __exit arcfb_exit(void)
{
platform_device_unregister(arcfb_device);
- driver_unregister(&arcfb_driver);
+ platform_driver_unregister(&arcfb_driver);
}
module_param(num_cols, ulong, 0);