mirror of https://gitee.com/openkylin/linux.git
ARM: pxa: clean up set_pxa_fb_info
set_pxa_fb_info() has been a long-standing wart in the naming scheme of the pxa_set_xxx_info() functions. This renames the function, and combines set_pxa_fb_parent() with set_pxa_fb_info(). Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> Acked-by: Igor Grinberg <grinberg@compulab.co.il> Signed-off-by: Eric Miao <eric.y.miao@gmail.com>
This commit is contained in:
parent
54a93b69a4
commit
4321e1a12b
|
@ -194,7 +194,7 @@ static struct notifier_block am200_fb_notif = {
|
|||
};
|
||||
|
||||
/* this gets called as part of our init. these steps must be done now so
|
||||
* that we can use set_pxa_fb_info */
|
||||
* that we can use pxa_set_fb_info */
|
||||
static void __init am200_presetup_fb(void)
|
||||
{
|
||||
int fw;
|
||||
|
@ -249,7 +249,7 @@ static void __init am200_presetup_fb(void)
|
|||
/* we divide since we told the LCD controller we're 16bpp */
|
||||
am200_fb_info.modes->xres /= 2;
|
||||
|
||||
set_pxa_fb_info(&am200_fb_info);
|
||||
pxa_set_fb_info(NULL, &am200_fb_info);
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -264,7 +264,7 @@ static void __init balloon3_lcd_init(void)
|
|||
}
|
||||
|
||||
balloon3_lcd_screen.pxafb_backlight_power = balloon3_backlight_power;
|
||||
set_pxa_fb_info(&balloon3_lcd_screen);
|
||||
pxa_set_fb_info(NULL, &balloon3_lcd_screen);
|
||||
return;
|
||||
|
||||
err2:
|
||||
|
|
|
@ -379,7 +379,7 @@ __setup("monitor=", cmx2xx_set_display);
|
|||
|
||||
static void __init cmx2xx_init_display(void)
|
||||
{
|
||||
set_pxa_fb_info(cmx2xx_display);
|
||||
pxa_set_fb_info(NULL, cmx2xx_display);
|
||||
}
|
||||
#else
|
||||
static inline void cmx2xx_init_display(void) {}
|
||||
|
|
|
@ -296,7 +296,7 @@ static struct pxafb_mach_info cm_x300_lcd = {
|
|||
|
||||
static void __init cm_x300_init_lcd(void)
|
||||
{
|
||||
set_pxa_fb_info(&cm_x300_lcd);
|
||||
pxa_set_fb_info(NULL, &cm_x300_lcd);
|
||||
}
|
||||
#else
|
||||
static inline void cm_x300_init_lcd(void) {}
|
||||
|
|
|
@ -176,7 +176,7 @@ static struct pxafb_mach_info income_lcd_screen = {
|
|||
|
||||
static void __init income_lcd_init(void)
|
||||
{
|
||||
set_pxa_fb_info(&income_lcd_screen);
|
||||
pxa_set_fb_info(NULL, &income_lcd_screen);
|
||||
}
|
||||
#else
|
||||
static inline void income_lcd_init(void) {}
|
||||
|
|
|
@ -105,7 +105,7 @@ void __init colibri_pxa3xx_init_lcd(int bl_pin)
|
|||
lcd_bl_pin = bl_pin;
|
||||
gpio_request(bl_pin, "lcd backlight");
|
||||
gpio_direction_output(bl_pin, 0);
|
||||
set_pxa_fb_info(&sharp_lq43_info);
|
||||
pxa_set_fb_info(NULL, &sharp_lq43_info);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
|
@ -188,16 +188,12 @@ struct platform_device pxa_device_fb = {
|
|||
.resource = pxafb_resources,
|
||||
};
|
||||
|
||||
void __init set_pxa_fb_info(struct pxafb_mach_info *info)
|
||||
void __init pxa_set_fb_info(struct device *parent, struct pxafb_mach_info *info)
|
||||
{
|
||||
pxa_device_fb.dev.parent = parent;
|
||||
pxa_register_device(&pxa_device_fb, info);
|
||||
}
|
||||
|
||||
void __init set_pxa_fb_parent(struct device *parent_dev)
|
||||
{
|
||||
pxa_device_fb.dev.parent = parent_dev;
|
||||
}
|
||||
|
||||
static struct resource pxa_resource_ffuart[] = {
|
||||
{
|
||||
.start = 0x40100000,
|
||||
|
|
|
@ -689,7 +689,7 @@ static struct pxafb_mach_info em_x270_lcd = {
|
|||
|
||||
static void __init em_x270_init_lcd(void)
|
||||
{
|
||||
set_pxa_fb_info(&em_x270_lcd);
|
||||
pxa_set_fb_info(NULL, &em_x270_lcd);
|
||||
}
|
||||
#else
|
||||
static inline void em_x270_init_lcd(void) {}
|
||||
|
|
|
@ -344,7 +344,7 @@ static void __init e400_init(void)
|
|||
/* Fixme - e400 may have a switched clock */
|
||||
eseries_register_clks();
|
||||
eseries_get_tmio_gpios();
|
||||
set_pxa_fb_info(&e400_pxafb_mach_info);
|
||||
pxa_set_fb_info(NULL, &e400_pxafb_mach_info);
|
||||
platform_add_devices(ARRAY_AND_SIZE(e400_devices));
|
||||
pxa_set_udc_info(&e7xx_udc_mach_info);
|
||||
}
|
||||
|
|
|
@ -783,7 +783,7 @@ static void __init a780_init(void)
|
|||
|
||||
pxa_set_i2c_info(NULL);
|
||||
|
||||
set_pxa_fb_info(&ezx_fb_info_1);
|
||||
pxa_set_fb_info(NULL, &ezx_fb_info_1);
|
||||
|
||||
pxa_set_keypad_info(&a780_keypad_platform_data);
|
||||
|
||||
|
@ -853,7 +853,7 @@ static void __init e680_init(void)
|
|||
pxa_set_i2c_info(NULL);
|
||||
i2c_register_board_info(0, ARRAY_AND_SIZE(e680_i2c_board_info));
|
||||
|
||||
set_pxa_fb_info(&ezx_fb_info_1);
|
||||
pxa_set_fb_info(NULL, &ezx_fb_info_1);
|
||||
|
||||
pxa_set_keypad_info(&e680_keypad_platform_data);
|
||||
|
||||
|
@ -918,7 +918,7 @@ static void __init a1200_init(void)
|
|||
pxa_set_i2c_info(NULL);
|
||||
i2c_register_board_info(0, ARRAY_AND_SIZE(a1200_i2c_board_info));
|
||||
|
||||
set_pxa_fb_info(&ezx_fb_info_2);
|
||||
pxa_set_fb_info(NULL, &ezx_fb_info_2);
|
||||
|
||||
pxa_set_keypad_info(&a1200_keypad_platform_data);
|
||||
|
||||
|
@ -1103,7 +1103,7 @@ static void __init a910_init(void)
|
|||
pxa_set_i2c_info(NULL);
|
||||
i2c_register_board_info(0, ARRAY_AND_SIZE(a910_i2c_board_info));
|
||||
|
||||
set_pxa_fb_info(&ezx_fb_info_2);
|
||||
pxa_set_fb_info(NULL, &ezx_fb_info_2);
|
||||
|
||||
pxa_set_keypad_info(&a910_keypad_platform_data);
|
||||
|
||||
|
@ -1173,7 +1173,7 @@ static void __init e6_init(void)
|
|||
pxa_set_i2c_info(NULL);
|
||||
i2c_register_board_info(0, ARRAY_AND_SIZE(e6_i2c_board_info));
|
||||
|
||||
set_pxa_fb_info(&ezx_fb_info_2);
|
||||
pxa_set_fb_info(NULL, &ezx_fb_info_2);
|
||||
|
||||
pxa_set_keypad_info(&e6_keypad_platform_data);
|
||||
|
||||
|
@ -1212,7 +1212,7 @@ static void __init e2_init(void)
|
|||
pxa_set_i2c_info(NULL);
|
||||
i2c_register_board_info(0, ARRAY_AND_SIZE(e2_i2c_board_info));
|
||||
|
||||
set_pxa_fb_info(&ezx_fb_info_2);
|
||||
pxa_set_fb_info(NULL, &ezx_fb_info_2);
|
||||
|
||||
pxa_set_keypad_info(&e2_keypad_platform_data);
|
||||
|
||||
|
|
|
@ -167,7 +167,7 @@ static void __init idp_init(void)
|
|||
|
||||
platform_device_register(&smc91x_device);
|
||||
//platform_device_register(&mst_audio_device);
|
||||
set_pxa_fb_info(&sharp_lm8v31);
|
||||
pxa_set_fb_info(NULL, &sharp_lm8v31);
|
||||
pxa_set_mci_info(&idp_mci_platform_data);
|
||||
}
|
||||
|
||||
|
|
|
@ -154,8 +154,8 @@ struct pxafb_mach_info {
|
|||
void (*pxafb_lcd_power)(int, struct fb_var_screeninfo *);
|
||||
void (*smart_update)(struct fb_info *);
|
||||
};
|
||||
void set_pxa_fb_info(struct pxafb_mach_info *hard_pxa_fb_info);
|
||||
void set_pxa_fb_parent(struct device *parent_dev);
|
||||
|
||||
void pxa_set_fb_info(struct device *, struct pxafb_mach_info *);
|
||||
unsigned long pxafb_get_hsync_time(struct device *dev);
|
||||
|
||||
extern int pxafb_smart_queue(struct fb_info *info, uint16_t *cmds, int);
|
||||
|
|
|
@ -185,7 +185,7 @@ static struct pxafb_mach_info littleton_lcd_info = {
|
|||
|
||||
static void littleton_init_lcd(void)
|
||||
{
|
||||
set_pxa_fb_info(&littleton_lcd_info);
|
||||
pxa_set_fb_info(NULL, &littleton_lcd_info);
|
||||
}
|
||||
#else
|
||||
static inline void littleton_init_lcd(void) {};
|
||||
|
|
|
@ -480,7 +480,7 @@ static void __init lpd270_init(void)
|
|||
pxa_set_ac97_info(NULL);
|
||||
|
||||
if (lpd270_lcd_to_use != NULL)
|
||||
set_pxa_fb_info(lpd270_lcd_to_use);
|
||||
pxa_set_fb_info(NULL, lpd270_lcd_to_use);
|
||||
|
||||
pxa_set_ohci_info(&lpd270_ohci_platform_data);
|
||||
}
|
||||
|
|
|
@ -521,7 +521,7 @@ static void __init lubbock_init(void)
|
|||
|
||||
clk_add_alias("SA1111_CLK", NULL, "GPIO11_CLK", NULL);
|
||||
pxa_set_udc_info(&udc_info);
|
||||
set_pxa_fb_info(&sharp_lm8v31);
|
||||
pxa_set_fb_info(NULL, &sharp_lm8v31);
|
||||
pxa_set_mci_info(&lubbock_mci_platform_data);
|
||||
pxa_set_ficp_info(&lubbock_ficp_platform_data);
|
||||
pxa_set_ac97_info(NULL);
|
||||
|
|
|
@ -757,7 +757,7 @@ static void __init magician_init(void)
|
|||
gpio_direction_output(GPIO104_MAGICIAN_LCD_POWER_1, 0);
|
||||
gpio_direction_output(GPIO105_MAGICIAN_LCD_POWER_2, 0);
|
||||
gpio_direction_output(GPIO106_MAGICIAN_LCD_POWER_3, 0);
|
||||
set_pxa_fb_info(lcd_select ? &samsung_info : &toppoly_info);
|
||||
pxa_set_fb_info(NULL, lcd_select ? &samsung_info : &toppoly_info);
|
||||
} else
|
||||
pr_err("LCD detection: CPLD mapping failed\n");
|
||||
}
|
||||
|
|
|
@ -592,7 +592,7 @@ static void __init mainstone_init(void)
|
|||
else
|
||||
mainstone_pxafb_info.modes = &toshiba_ltm035a776c_mode;
|
||||
|
||||
set_pxa_fb_info(&mainstone_pxafb_info);
|
||||
pxa_set_fb_info(NULL, &mainstone_pxafb_info);
|
||||
mainstone_backlight_register();
|
||||
|
||||
pxa_set_mci_info(&mainstone_mci_platform_data);
|
||||
|
|
|
@ -795,7 +795,7 @@ static void __init mioa701_machine_init(void)
|
|||
pxa_set_stuart_info(NULL);
|
||||
mio_gpio_request(ARRAY_AND_SIZE(global_gpios));
|
||||
bootstrap_init();
|
||||
set_pxa_fb_info(&mioa701_pxafb_info);
|
||||
pxa_set_fb_info(NULL, &mioa701_pxafb_info);
|
||||
pxa_set_mci_info(&mioa701_mci_info);
|
||||
pxa_set_keypad_info(&mioa701_keypad_info);
|
||||
pxa_set_udc_info(&mioa701_udc_info);
|
||||
|
|
|
@ -158,7 +158,7 @@ void __init palm27x_lcd_init(int power, struct pxafb_mode_info *mode)
|
|||
palm27x_lcd_screen.pxafb_lcd_power = palm27x_lcd_ctl;
|
||||
}
|
||||
|
||||
set_pxa_fb_info(&palm27x_lcd_screen);
|
||||
pxa_set_fb_info(NULL, &palm27x_lcd_screen);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
|
@ -507,7 +507,7 @@ static struct pxafb_mach_info palmtc_lcd_screen = {
|
|||
|
||||
static void __init palmtc_lcd_init(void)
|
||||
{
|
||||
set_pxa_fb_info(&palmtc_lcd_screen);
|
||||
pxa_set_fb_info(NULL, &palmtc_lcd_screen);
|
||||
}
|
||||
#else
|
||||
static inline void palmtc_lcd_init(void) {}
|
||||
|
|
|
@ -346,7 +346,7 @@ static void __init palmte2_init(void)
|
|||
pxa_set_btuart_info(NULL);
|
||||
pxa_set_stuart_info(NULL);
|
||||
|
||||
set_pxa_fb_info(&palmte2_lcd_screen);
|
||||
pxa_set_fb_info(NULL, &palmte2_lcd_screen);
|
||||
pxa_set_mci_info(&palmte2_mci_platform_data);
|
||||
palmte2_udc_init();
|
||||
pxa_set_ac97_info(&palmte2_ac97_pdata);
|
||||
|
|
|
@ -515,7 +515,7 @@ void __init pcm990_baseboard_init(void)
|
|||
pcm990_init_irq();
|
||||
|
||||
#ifndef CONFIG_PCM990_DISPLAY_NONE
|
||||
set_pxa_fb_info(&pcm990_fbinfo);
|
||||
pxa_set_fb_info(NULL, &pcm990_fbinfo);
|
||||
#endif
|
||||
platform_device_register(&pcm990_backlight_device);
|
||||
|
||||
|
|
|
@ -445,8 +445,7 @@ static void __init poodle_init(void)
|
|||
if (ret)
|
||||
pr_warning("poodle: Unable to register LoCoMo device\n");
|
||||
|
||||
set_pxa_fb_parent(&poodle_locomo_device.dev);
|
||||
set_pxa_fb_info(&poodle_fb_info);
|
||||
pxa_set_fb_info(&poodle_locomo_device.dev, &poodle_fb_info);
|
||||
pxa_set_udc_info(&udc_info);
|
||||
pxa_set_mci_info(&poodle_mci_platform_data);
|
||||
pxa_set_ficp_info(&poodle_ficp_platform_data);
|
||||
|
|
|
@ -597,7 +597,7 @@ static void __init raumfeld_lcd_init(void)
|
|||
{
|
||||
int ret;
|
||||
|
||||
set_pxa_fb_info(&raumfeld_sharp_lcd_info);
|
||||
pxa_set_fb_info(NULL, &raumfeld_sharp_lcd_info);
|
||||
|
||||
/* Earlier devices had the backlight regulator controlled
|
||||
* via PWM, later versions use another controller for that */
|
||||
|
|
|
@ -473,7 +473,7 @@ static struct pxafb_mach_info saar_lcd_info = {
|
|||
|
||||
static void __init saar_init_lcd(void)
|
||||
{
|
||||
set_pxa_fb_info(&saar_lcd_info);
|
||||
pxa_set_fb_info(NULL, &saar_lcd_info);
|
||||
}
|
||||
#else
|
||||
static inline void saar_init_lcd(void) {}
|
||||
|
|
|
@ -725,7 +725,7 @@ static struct pxafb_mach_info spitz_pxafb_info = {
|
|||
|
||||
static void __init spitz_lcd_init(void)
|
||||
{
|
||||
set_pxa_fb_info(&spitz_pxafb_info);
|
||||
pxa_set_fb_info(NULL, &spitz_pxafb_info);
|
||||
}
|
||||
#else
|
||||
static inline void spitz_lcd_init(void) {}
|
||||
|
|
|
@ -466,7 +466,7 @@ static void __init tavorevb_init_lcd(void)
|
|||
{
|
||||
platform_device_register(&tavorevb_backlight_devices[0]);
|
||||
platform_device_register(&tavorevb_backlight_devices[1]);
|
||||
set_pxa_fb_info(&tavorevb_lcd_info);
|
||||
pxa_set_fb_info(NULL, &tavorevb_lcd_info);
|
||||
}
|
||||
#else
|
||||
static inline void tavorevb_init_lcd(void) {}
|
||||
|
|
|
@ -516,9 +516,9 @@ static void __init trizeps4_init(void)
|
|||
pxa_set_stuart_info(NULL);
|
||||
|
||||
if (0) /* dont know how to determine LCD */
|
||||
set_pxa_fb_info(&sharp_lcd);
|
||||
pxa_set_fb_info(NULL, &sharp_lcd);
|
||||
else
|
||||
set_pxa_fb_info(&toshiba_lcd);
|
||||
pxa_set_fb_info(NULL, &toshiba_lcd);
|
||||
|
||||
pxa_set_mci_info(&trizeps4_mci_platform_data);
|
||||
#ifndef STATUS_LEDS_ON_STUART_PINS
|
||||
|
|
|
@ -932,7 +932,7 @@ static void __init viper_init(void)
|
|||
/* Wake-up serial console */
|
||||
viper_init_serial_gpio();
|
||||
|
||||
set_pxa_fb_info(&fb_info);
|
||||
pxa_set_fb_info(NULL, &fb_info);
|
||||
|
||||
/* v1 hardware cannot use the datacs line */
|
||||
version = viper_hw_version();
|
||||
|
|
|
@ -573,7 +573,7 @@ static void __init vpac270_lcd_init(void)
|
|||
}
|
||||
|
||||
vpac270_lcd_screen.pxafb_lcd_power = vpac270_lcd_power;
|
||||
set_pxa_fb_info(&vpac270_lcd_screen);
|
||||
pxa_set_fb_info(NULL, &vpac270_lcd_screen);
|
||||
return;
|
||||
|
||||
err2:
|
||||
|
|
|
@ -272,7 +272,7 @@ static struct pxafb_mach_info z2_lcd_screen = {
|
|||
|
||||
static void __init z2_lcd_init(void)
|
||||
{
|
||||
set_pxa_fb_info(&z2_lcd_screen);
|
||||
pxa_set_fb_info(NULL, &z2_lcd_screen);
|
||||
}
|
||||
#else
|
||||
static inline void z2_lcd_init(void) {}
|
||||
|
|
|
@ -847,7 +847,7 @@ static void __init zeus_init(void)
|
|||
if (zeus_setup_fb_gpios())
|
||||
pr_err("Failed to setup fb gpios\n");
|
||||
else
|
||||
set_pxa_fb_info(&zeus_fb_info);
|
||||
pxa_set_fb_info(NULL, &zeus_fb_info);
|
||||
|
||||
pxa_set_mci_info(&zeus_mci_platform_data);
|
||||
pxa_set_udc_info(&zeus_udc_info);
|
||||
|
|
|
@ -208,7 +208,7 @@ static void __init zylonite_init_lcd(void)
|
|||
platform_device_register(&zylonite_backlight_device);
|
||||
|
||||
if (lcd_id & 0x20) {
|
||||
set_pxa_fb_info(&zylonite_sharp_lcd_info);
|
||||
pxa_set_fb_info(NULL, &zylonite_sharp_lcd_info);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -220,7 +220,7 @@ static void __init zylonite_init_lcd(void)
|
|||
else
|
||||
zylonite_toshiba_lcd_info.modes = &toshiba_ltm04c380k_mode;
|
||||
|
||||
set_pxa_fb_info(&zylonite_toshiba_lcd_info);
|
||||
pxa_set_fb_info(NULL, &zylonite_toshiba_lcd_info);
|
||||
}
|
||||
#else
|
||||
static inline void zylonite_init_lcd(void) {}
|
||||
|
|
Loading…
Reference in New Issue