diff options
author | Maciej W. Rozycki <macro@linux-mips.org> | 2007-02-12 03:54:56 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-02-12 12:48:41 -0500 |
commit | 1b2f2fe8ac0273ae9a9b480b799ce62d832168cb (patch) | |
tree | 4237ba89bd082a087fa41f4bdb0e0e3e10ed91a8 /drivers | |
parent | c7488ce38121fc92aee847c51ac74dced1d48c3a (diff) |
[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: Maciej W. Rozycki <macro@linux-mips.org>
Cc: James Simmons <jsimmons@infradead.org>
Cc: "Antonino A. Daplas" <adaplas@pol.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/video/tgafb.c | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/drivers/video/tgafb.c b/drivers/video/tgafb.c index 0679b389a808..2a6bfcdc3039 100644 --- a/drivers/video/tgafb.c +++ b/drivers/video/tgafb.c | |||
@@ -43,8 +43,9 @@ static void tgafb_imageblit(struct fb_info *, const struct fb_image *); | |||
43 | static void tgafb_fillrect(struct fb_info *, const struct fb_fillrect *); | 43 | static void tgafb_fillrect(struct fb_info *, const struct fb_fillrect *); |
44 | static void tgafb_copyarea(struct fb_info *, const struct fb_copyarea *); | 44 | static void tgafb_copyarea(struct fb_info *, const struct fb_copyarea *); |
45 | 45 | ||
46 | static int tgafb_pci_register(struct pci_dev *, const struct pci_device_id *); | 46 | static int __devinit tgafb_pci_register(struct pci_dev *, |
47 | static void tgafb_pci_unregister(struct pci_dev *); | 47 | const struct pci_device_id *); |
48 | static void __devexit tgafb_pci_unregister(struct pci_dev *); | ||
48 | 49 | ||
49 | static const char *mode_option = "640x480@60"; | 50 | static const char *mode_option = "640x480@60"; |
50 | 51 | ||
@@ -1454,7 +1455,7 @@ tgafb_pci_register(struct pci_dev *pdev, const struct pci_device_id *ent) | |||
1454 | return ret; | 1455 | return ret; |
1455 | } | 1456 | } |
1456 | 1457 | ||
1457 | static void __exit | 1458 | static void __devexit |
1458 | tgafb_pci_unregister(struct pci_dev *pdev) | 1459 | tgafb_pci_unregister(struct pci_dev *pdev) |
1459 | { | 1460 | { |
1460 | struct fb_info *info = pci_get_drvdata(pdev); | 1461 | struct fb_info *info = pci_get_drvdata(pdev); |
@@ -1470,16 +1471,14 @@ tgafb_pci_unregister(struct pci_dev *pdev) | |||
1470 | framebuffer_release(info); | 1471 | framebuffer_release(info); |
1471 | } | 1472 | } |
1472 | 1473 | ||
1473 | #ifdef MODULE | 1474 | static void __devexit |
1474 | static void __exit | ||
1475 | tgafb_exit(void) | 1475 | tgafb_exit(void) |
1476 | { | 1476 | { |
1477 | pci_unregister_driver(&tgafb_driver); | 1477 | pci_unregister_driver(&tgafb_driver); |
1478 | } | 1478 | } |
1479 | #endif /* MODULE */ | ||
1480 | 1479 | ||
1481 | #ifndef MODULE | 1480 | #ifndef MODULE |
1482 | int __init | 1481 | static int __devinit |
1483 | tgafb_setup(char *arg) | 1482 | tgafb_setup(char *arg) |
1484 | { | 1483 | { |
1485 | char *this_opt; | 1484 | char *this_opt; |
@@ -1501,7 +1500,7 @@ tgafb_setup(char *arg) | |||
1501 | } | 1500 | } |
1502 | #endif /* !MODULE */ | 1501 | #endif /* !MODULE */ |
1503 | 1502 | ||
1504 | int __init | 1503 | static int __devinit |
1505 | tgafb_init(void) | 1504 | tgafb_init(void) |
1506 | { | 1505 | { |
1507 | #ifndef MODULE | 1506 | #ifndef MODULE |
@@ -1519,10 +1518,7 @@ tgafb_init(void) | |||
1519 | */ | 1518 | */ |
1520 | 1519 | ||
1521 | module_init(tgafb_init); | 1520 | module_init(tgafb_init); |
1522 | |||
1523 | #ifdef MODULE | ||
1524 | module_exit(tgafb_exit); | 1521 | module_exit(tgafb_exit); |
1525 | #endif | ||
1526 | 1522 | ||
1527 | MODULE_DESCRIPTION("framebuffer driver for TGA chipset"); | 1523 | MODULE_DESCRIPTION("framebuffer driver for TGA chipset"); |
1528 | MODULE_LICENSE("GPL"); | 1524 | MODULE_LICENSE("GPL"); |