Commit 27844cb8 authored by Paul Gortmaker's avatar Paul Gortmaker Committed by Tomi Valkeinen

drivers/video: make fbdev/sunxvr1000.c explicitly non-modular

The Kconfig currently controlling compilation of this code is:

config FB_XVR1000
        bool "Sun XVR-1000 support"

...meaning that it currently is not being built as a module by anyone.
Lets remove the modular code that is essentially orphaned, so that
when reading the driver there is no doubt it is builtin-only.

Since module_init translates to device_initcall in the non-modular
case, the init ordering remains unchanged with this commit.

We explicitly disallow a driver unbind, since that doesn't have a
sensible use case anyway, and it allows us to drop the ".remove"
code for non-modular drivers.

We don't replace module.h with init.h since the file already has that.
Also note that MODULE_DEVICE_TABLE is a no-op for non-modular code.

We also delete the MODULE_LICENSE tag etc. since all that information
was (or is now) contained at the top of the file in the comments.

Cc: Jean-Christophe Plagniol-Villard <plagnioj@jcrosoft.com>
Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: sparclinux@vger.kernel.org
Cc: linux-fbdev@vger.kernel.org
Signed-off-by: default avatarPaul Gortmaker <paul.gortmaker@windriver.com>
Signed-off-by: default avatarTomi Valkeinen <tomi.valkeinen@ti.com>
parent d61b0ef7
/* sunxvr1000.c: Sun XVR-1000 driver for sparc64 systems /* sunxvr1000.c: Sun XVR-1000 fb driver for sparc64 systems
*
* License: GPL
* *
* Copyright (C) 2010 David S. Miller (davem@davemloft.net) * Copyright (C) 2010 David S. Miller (davem@davemloft.net)
*/ */
#include <linux/module.h>
#include <linux/kernel.h> #include <linux/kernel.h>
#include <linux/fb.h> #include <linux/fb.h>
#include <linux/init.h> #include <linux/init.h>
...@@ -173,36 +174,19 @@ static int gfb_probe(struct platform_device *op) ...@@ -173,36 +174,19 @@ static int gfb_probe(struct platform_device *op)
return err; return err;
} }
static int gfb_remove(struct platform_device *op)
{
struct fb_info *info = dev_get_drvdata(&op->dev);
struct gfb_info *gp = info->par;
unregister_framebuffer(info);
iounmap(gp->fb_base);
of_iounmap(&op->resource[6], gp->fb_base, gp->fb_size);
framebuffer_release(info);
return 0;
}
static const struct of_device_id gfb_match[] = { static const struct of_device_id gfb_match[] = {
{ {
.name = "SUNW,gfb", .name = "SUNW,gfb",
}, },
{}, {},
}; };
MODULE_DEVICE_TABLE(of, ffb_match);
static struct platform_driver gfb_driver = { static struct platform_driver gfb_driver = {
.probe = gfb_probe, .probe = gfb_probe,
.remove = gfb_remove,
.driver = { .driver = {
.name = "gfb", .name = "gfb",
.of_match_table = gfb_match, .of_match_table = gfb_match,
.suppress_bind_attrs = true,
}, },
}; };
...@@ -213,16 +197,4 @@ static int __init gfb_init(void) ...@@ -213,16 +197,4 @@ static int __init gfb_init(void)
return platform_driver_register(&gfb_driver); return platform_driver_register(&gfb_driver);
} }
device_initcall(gfb_init);
static void __exit gfb_exit(void)
{
platform_driver_unregister(&gfb_driver);
}
module_init(gfb_init);
module_exit(gfb_exit);
MODULE_DESCRIPTION("framebuffer driver for Sun XVR-1000 graphics");
MODULE_AUTHOR("David S. Miller <davem@davemloft.net>");
MODULE_VERSION("1.0");
MODULE_LICENSE("GPL");
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment