aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video
diff options
context:
space:
mode:
authorYijing Wang <wangyijing@huawei.com>2013-12-05 06:25:18 -0500
committerTomi Valkeinen <tomi.valkeinen@ti.com>2014-01-17 03:57:46 -0500
commit3ca356b6de31182d97ebdd74a475da3583f5d7fe (patch)
treed64350512954aa64950b8341b9ae80788e1b5eda /drivers/video
parentf5d2b7c28b67d627646b6a0142bc201a7b1516b0 (diff)
video: Replace local macro with PCI standard macro
Replace local macro TGA_BUS_PCI with PCI standard marco dev_is_pci(). Signed-off-by: Yijing Wang <wangyijing@huawei.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Diffstat (limited to 'drivers/video')
-rw-r--r--drivers/video/tgafb.c16
1 files changed, 5 insertions, 11 deletions
diff --git a/drivers/video/tgafb.c b/drivers/video/tgafb.c
index f28674fea909..5e94c6e4f682 100644
--- a/drivers/video/tgafb.c
+++ b/drivers/video/tgafb.c
@@ -32,12 +32,6 @@
32 32
33#include <video/tgafb.h> 33#include <video/tgafb.h>
34 34
35#ifdef CONFIG_PCI
36#define TGA_BUS_PCI(dev) (dev->bus == &pci_bus_type)
37#else
38#define TGA_BUS_PCI(dev) 0
39#endif
40
41#ifdef CONFIG_TC 35#ifdef CONFIG_TC
42#define TGA_BUS_TC(dev) (dev->bus == &tc_bus_type) 36#define TGA_BUS_TC(dev) (dev->bus == &tc_bus_type)
43#else 37#else
@@ -236,7 +230,7 @@ tgafb_set_par(struct fb_info *info)
236 }; 230 };
237 231
238 struct tga_par *par = (struct tga_par *) info->par; 232 struct tga_par *par = (struct tga_par *) info->par;
239 int tga_bus_pci = TGA_BUS_PCI(par->dev); 233 int tga_bus_pci = dev_is_pci(par->dev);
240 int tga_bus_tc = TGA_BUS_TC(par->dev); 234 int tga_bus_tc = TGA_BUS_TC(par->dev);
241 u32 htimings, vtimings, pll_freq; 235 u32 htimings, vtimings, pll_freq;
242 u8 tga_type; 236 u8 tga_type;
@@ -519,7 +513,7 @@ tgafb_setcolreg(unsigned regno, unsigned red, unsigned green, unsigned blue,
519 unsigned transp, struct fb_info *info) 513 unsigned transp, struct fb_info *info)
520{ 514{
521 struct tga_par *par = (struct tga_par *) info->par; 515 struct tga_par *par = (struct tga_par *) info->par;
522 int tga_bus_pci = TGA_BUS_PCI(par->dev); 516 int tga_bus_pci = dev_is_pci(par->dev);
523 int tga_bus_tc = TGA_BUS_TC(par->dev); 517 int tga_bus_tc = TGA_BUS_TC(par->dev);
524 518
525 if (regno > 255) 519 if (regno > 255)
@@ -1472,7 +1466,7 @@ static void
1472tgafb_init_fix(struct fb_info *info) 1466tgafb_init_fix(struct fb_info *info)
1473{ 1467{
1474 struct tga_par *par = (struct tga_par *)info->par; 1468 struct tga_par *par = (struct tga_par *)info->par;
1475 int tga_bus_pci = TGA_BUS_PCI(par->dev); 1469 int tga_bus_pci = dev_is_pci(par->dev);
1476 int tga_bus_tc = TGA_BUS_TC(par->dev); 1470 int tga_bus_tc = TGA_BUS_TC(par->dev);
1477 u8 tga_type = par->tga_type; 1471 u8 tga_type = par->tga_type;
1478 const char *tga_type_name = NULL; 1472 const char *tga_type_name = NULL;
@@ -1560,7 +1554,7 @@ static int tgafb_register(struct device *dev)
1560 const struct fb_videomode *modedb_tga = NULL; 1554 const struct fb_videomode *modedb_tga = NULL;
1561 resource_size_t bar0_start = 0, bar0_len = 0; 1555 resource_size_t bar0_start = 0, bar0_len = 0;
1562 const char *mode_option_tga = NULL; 1556 const char *mode_option_tga = NULL;
1563 int tga_bus_pci = TGA_BUS_PCI(dev); 1557 int tga_bus_pci = dev_is_pci(dev);
1564 int tga_bus_tc = TGA_BUS_TC(dev); 1558 int tga_bus_tc = TGA_BUS_TC(dev);
1565 unsigned int modedbsize_tga = 0; 1559 unsigned int modedbsize_tga = 0;
1566 void __iomem *mem_base; 1560 void __iomem *mem_base;
@@ -1690,7 +1684,7 @@ static int tgafb_register(struct device *dev)
1690static void tgafb_unregister(struct device *dev) 1684static void tgafb_unregister(struct device *dev)
1691{ 1685{
1692 resource_size_t bar0_start = 0, bar0_len = 0; 1686 resource_size_t bar0_start = 0, bar0_len = 0;
1693 int tga_bus_pci = TGA_BUS_PCI(dev); 1687 int tga_bus_pci = dev_is_pci(dev);
1694 int tga_bus_tc = TGA_BUS_TC(dev); 1688 int tga_bus_tc = TGA_BUS_TC(dev);
1695 struct fb_info *info = NULL; 1689 struct fb_info *info = NULL;
1696 struct tga_par *par; 1690 struct tga_par *par;