Commit 1b2f2fe8 authored by Maciej W. Rozycki's avatar Maciej W. Rozycki Committed by Linus Torvalds

[PATCH] tgafb: module support fixes

This is a set of clean-ups for the module support in the driver -- __devinit
and __devexit classifiers are now specified correctly, initialization
functions are marked static and a few unnecessary #ifdefs are removed.
Signed-off-by: default avatarMaciej W. Rozycki <macro@linux-mips.org>
Cc: James Simmons <jsimmons@infradead.org>
Cc: "Antonino A. Daplas" <adaplas@pol.net>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent c7488ce3
...@@ -43,8 +43,9 @@ static void tgafb_imageblit(struct fb_info *, const struct fb_image *); ...@@ -43,8 +43,9 @@ static void tgafb_imageblit(struct fb_info *, const struct fb_image *);
static void tgafb_fillrect(struct fb_info *, const struct fb_fillrect *); static void tgafb_fillrect(struct fb_info *, const struct fb_fillrect *);
static void tgafb_copyarea(struct fb_info *, const struct fb_copyarea *); static void tgafb_copyarea(struct fb_info *, const struct fb_copyarea *);
static int tgafb_pci_register(struct pci_dev *, const struct pci_device_id *); static int __devinit tgafb_pci_register(struct pci_dev *,
static void tgafb_pci_unregister(struct pci_dev *); const struct pci_device_id *);
static void __devexit tgafb_pci_unregister(struct pci_dev *);
static const char *mode_option = "640x480@60"; static const char *mode_option = "640x480@60";
...@@ -1454,7 +1455,7 @@ tgafb_pci_register(struct pci_dev *pdev, const struct pci_device_id *ent) ...@@ -1454,7 +1455,7 @@ tgafb_pci_register(struct pci_dev *pdev, const struct pci_device_id *ent)
return ret; return ret;
} }
static void __exit static void __devexit
tgafb_pci_unregister(struct pci_dev *pdev) tgafb_pci_unregister(struct pci_dev *pdev)
{ {
struct fb_info *info = pci_get_drvdata(pdev); struct fb_info *info = pci_get_drvdata(pdev);
...@@ -1470,16 +1471,14 @@ tgafb_pci_unregister(struct pci_dev *pdev) ...@@ -1470,16 +1471,14 @@ tgafb_pci_unregister(struct pci_dev *pdev)
framebuffer_release(info); framebuffer_release(info);
} }
#ifdef MODULE static void __devexit
static void __exit
tgafb_exit(void) tgafb_exit(void)
{ {
pci_unregister_driver(&tgafb_driver); pci_unregister_driver(&tgafb_driver);
} }
#endif /* MODULE */
#ifndef MODULE #ifndef MODULE
int __init static int __devinit
tgafb_setup(char *arg) tgafb_setup(char *arg)
{ {
char *this_opt; char *this_opt;
...@@ -1501,7 +1500,7 @@ tgafb_setup(char *arg) ...@@ -1501,7 +1500,7 @@ tgafb_setup(char *arg)
} }
#endif /* !MODULE */ #endif /* !MODULE */
int __init static int __devinit
tgafb_init(void) tgafb_init(void)
{ {
#ifndef MODULE #ifndef MODULE
...@@ -1519,10 +1518,7 @@ tgafb_init(void) ...@@ -1519,10 +1518,7 @@ tgafb_init(void)
*/ */
module_init(tgafb_init); module_init(tgafb_init);
#ifdef MODULE
module_exit(tgafb_exit); module_exit(tgafb_exit);
#endif
MODULE_DESCRIPTION("framebuffer driver for TGA chipset"); MODULE_DESCRIPTION("framebuffer driver for TGA chipset");
MODULE_LICENSE("GPL"); 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