aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video/tgafb.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/video/tgafb.c')
-rw-r--r--drivers/video/tgafb.c45
1 files changed, 18 insertions, 27 deletions
diff --git a/drivers/video/tgafb.c b/drivers/video/tgafb.c
index aba7686b1a32..c9c8e5a1fdee 100644
--- a/drivers/video/tgafb.c
+++ b/drivers/video/tgafb.c
@@ -61,8 +61,8 @@ static void tgafb_fillrect(struct fb_info *, const struct fb_fillrect *);
61static void tgafb_copyarea(struct fb_info *, const struct fb_copyarea *); 61static void tgafb_copyarea(struct fb_info *, const struct fb_copyarea *);
62static int tgafb_pan_display(struct fb_var_screeninfo *var, struct fb_info *info); 62static int tgafb_pan_display(struct fb_var_screeninfo *var, struct fb_info *info);
63 63
64static int __devinit tgafb_register(struct device *dev); 64static int tgafb_register(struct device *dev);
65static void __devexit tgafb_unregister(struct device *dev); 65static void tgafb_unregister(struct device *dev);
66 66
67static const char *mode_option; 67static const char *mode_option;
68static const char *mode_option_pci = "640x480@60"; 68static const char *mode_option_pci = "640x480@60";
@@ -93,9 +93,8 @@ static struct fb_ops tgafb_ops = {
93/* 93/*
94 * PCI registration operations 94 * PCI registration operations
95 */ 95 */
96static int __devinit tgafb_pci_register(struct pci_dev *, 96static int tgafb_pci_register(struct pci_dev *, const struct pci_device_id *);
97 const struct pci_device_id *); 97static void tgafb_pci_unregister(struct pci_dev *);
98static void __devexit tgafb_pci_unregister(struct pci_dev *);
99 98
100static struct pci_device_id const tgafb_pci_table[] = { 99static struct pci_device_id const tgafb_pci_table[] = {
101 { PCI_DEVICE(PCI_VENDOR_ID_DEC, PCI_DEVICE_ID_DEC_TGA) }, 100 { PCI_DEVICE(PCI_VENDOR_ID_DEC, PCI_DEVICE_ID_DEC_TGA) },
@@ -107,17 +106,16 @@ static struct pci_driver tgafb_pci_driver = {
107 .name = "tgafb", 106 .name = "tgafb",
108 .id_table = tgafb_pci_table, 107 .id_table = tgafb_pci_table,
109 .probe = tgafb_pci_register, 108 .probe = tgafb_pci_register,
110 .remove = __devexit_p(tgafb_pci_unregister), 109 .remove = tgafb_pci_unregister,
111}; 110};
112 111
113static int __devinit 112static int tgafb_pci_register(struct pci_dev *pdev,
114tgafb_pci_register(struct pci_dev *pdev, const struct pci_device_id *ent) 113 const struct pci_device_id *ent)
115{ 114{
116 return tgafb_register(&pdev->dev); 115 return tgafb_register(&pdev->dev);
117} 116}
118 117
119static void __devexit 118static void tgafb_pci_unregister(struct pci_dev *pdev)
120tgafb_pci_unregister(struct pci_dev *pdev)
121{ 119{
122 tgafb_unregister(&pdev->dev); 120 tgafb_unregister(&pdev->dev);
123} 121}
@@ -127,8 +125,8 @@ tgafb_pci_unregister(struct pci_dev *pdev)
127/* 125/*
128 * TC registration operations 126 * TC registration operations
129 */ 127 */
130static int __devinit tgafb_tc_register(struct device *); 128static int tgafb_tc_register(struct device *);
131static int __devexit tgafb_tc_unregister(struct device *); 129static int tgafb_tc_unregister(struct device *);
132 130
133static struct tc_device_id const tgafb_tc_table[] = { 131static struct tc_device_id const tgafb_tc_table[] = {
134 { "DEC ", "PMAGD-AA" }, 132 { "DEC ", "PMAGD-AA" },
@@ -143,12 +141,11 @@ static struct tc_driver tgafb_tc_driver = {
143 .name = "tgafb", 141 .name = "tgafb",
144 .bus = &tc_bus_type, 142 .bus = &tc_bus_type,
145 .probe = tgafb_tc_register, 143 .probe = tgafb_tc_register,
146 .remove = __devexit_p(tgafb_tc_unregister), 144 .remove = tgafb_tc_unregister,
147 }, 145 },
148}; 146};
149 147
150static int __devinit 148static int tgafb_tc_register(struct device *dev)
151tgafb_tc_register(struct device *dev)
152{ 149{
153 int status = tgafb_register(dev); 150 int status = tgafb_register(dev);
154 if (!status) 151 if (!status)
@@ -156,8 +153,7 @@ tgafb_tc_register(struct device *dev)
156 return status; 153 return status;
157} 154}
158 155
159static int __devexit 156static int tgafb_tc_unregister(struct device *dev)
160tgafb_tc_unregister(struct device *dev)
161{ 157{
162 put_device(dev); 158 put_device(dev);
163 tgafb_unregister(dev); 159 tgafb_unregister(dev);
@@ -1546,8 +1542,7 @@ static int tgafb_pan_display(struct fb_var_screeninfo *var, struct fb_info *info
1546 return 0; 1542 return 0;
1547} 1543}
1548 1544
1549static int __devinit 1545static int tgafb_register(struct device *dev)
1550tgafb_register(struct device *dev)
1551{ 1546{
1552 static const struct fb_videomode modedb_tc = { 1547 static const struct fb_videomode modedb_tc = {
1553 /* 1280x1024 @ 72 Hz, 76.8 kHz hsync */ 1548 /* 1280x1024 @ 72 Hz, 76.8 kHz hsync */
@@ -1692,8 +1687,7 @@ tgafb_register(struct device *dev)
1692 return ret; 1687 return ret;
1693} 1688}
1694 1689
1695static void __devexit 1690static void tgafb_unregister(struct device *dev)
1696tgafb_unregister(struct device *dev)
1697{ 1691{
1698 resource_size_t bar0_start = 0, bar0_len = 0; 1692 resource_size_t bar0_start = 0, bar0_len = 0;
1699 int tga_bus_pci = TGA_BUS_PCI(dev); 1693 int tga_bus_pci = TGA_BUS_PCI(dev);
@@ -1721,16 +1715,14 @@ tgafb_unregister(struct device *dev)
1721 framebuffer_release(info); 1715 framebuffer_release(info);
1722} 1716}
1723 1717
1724static void __devexit 1718static void tgafb_exit(void)
1725tgafb_exit(void)
1726{ 1719{
1727 tc_unregister_driver(&tgafb_tc_driver); 1720 tc_unregister_driver(&tgafb_tc_driver);
1728 pci_unregister_driver(&tgafb_pci_driver); 1721 pci_unregister_driver(&tgafb_pci_driver);
1729} 1722}
1730 1723
1731#ifndef MODULE 1724#ifndef MODULE
1732static int __devinit 1725static int tgafb_setup(char *arg)
1733tgafb_setup(char *arg)
1734{ 1726{
1735 char *this_opt; 1727 char *this_opt;
1736 1728
@@ -1751,8 +1743,7 @@ tgafb_setup(char *arg)
1751} 1743}
1752#endif /* !MODULE */ 1744#endif /* !MODULE */
1753 1745
1754static int __devinit 1746static int tgafb_init(void)
1755tgafb_init(void)
1756{ 1747{
1757 int status; 1748 int status;
1758#ifndef MODULE 1749#ifndef MODULE