Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d2168146 authored by Pawel Moll's avatar Pawel Moll Committed by Greg Kroah-Hartman
Browse files

platform: Remove most references to platform_bus device



A number of board files in arch/arm and arch/unicore32
explicitly reference platform_bus device as a parent
for new platform devices.

This is unnecessary, as platform device API guarantees
that devices with NULL parent are going to by adopted
by the mentioned "root" device.

This patch removes or replaces with NULL such references.

Signed-off-by: default avatarPawel Moll <pawel.moll@arm.com>
Acked-by: default avatarOlof Johansson <olof@lixom.net>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 90125edb
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -60,8 +60,7 @@ static void bcm21664_restart(enum reboot_mode mode, const char *cmd)

static void __init bcm21664_init(void)
{
	of_platform_populate(NULL, of_default_bus_match_table, NULL,
		&platform_bus);
	of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
	kona_l2_cache_init();
}

+1 −2
Original line number Diff line number Diff line
@@ -58,8 +58,7 @@ static void bcm281xx_restart(enum reboot_mode mode, const char *cmd)

static void __init bcm281xx_init(void)
{
	of_platform_populate(NULL, of_default_bus_match_table, NULL,
		&platform_bus);
	of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
	kona_l2_cache_init();
}

+3 −3
Original line number Diff line number Diff line
@@ -158,16 +158,16 @@ static void __init edb7211_init_late(void)
	gpio_request_array(edb7211_gpios, ARRAY_SIZE(edb7211_gpios));

	platform_device_register(&edb7211_flash_pdev);
	platform_device_register_data(&platform_bus, "platform-lcd", 0,
	platform_device_register_data(NULL, "platform-lcd", 0,
				      &edb7211_lcd_power_pdata,
				      sizeof(edb7211_lcd_power_pdata));
	platform_device_register_data(&platform_bus, "generic-bl", 0,
	platform_device_register_data(NULL, "generic-bl", 0,
				      &edb7211_lcd_backlight_pdata,
				      sizeof(edb7211_lcd_backlight_pdata));
	platform_device_register_simple("video-clps711x", 0, NULL, 0);
	platform_device_register_simple("cs89x0", 0, edb7211_cs8900_resource,
					ARRAY_SIZE(edb7211_cs8900_resource));
	platform_device_register_data(&platform_bus, "i2c-gpio", 0,
	platform_device_register_data(NULL, "i2c-gpio", 0,
				      &edb7211_i2c_pdata,
				      sizeof(edb7211_i2c_pdata));
}
+3 −3
Original line number Diff line number Diff line
@@ -348,14 +348,14 @@ static void __init p720t_init_late(void)
{
	WARN_ON(gpio_request_array(p720t_gpios, ARRAY_SIZE(p720t_gpios)));

	platform_device_register_data(&platform_bus, "platform-lcd", 0,
	platform_device_register_data(NULL, "platform-lcd", 0,
				      &p720t_lcd_power_pdata,
				      sizeof(p720t_lcd_power_pdata));
	platform_device_register_data(&platform_bus, "generic-bl", 0,
	platform_device_register_data(NULL, "generic-bl", 0,
				      &p720t_lcd_backlight_pdata,
				      sizeof(p720t_lcd_backlight_pdata));
	platform_device_register_simple("video-clps711x", 0, NULL, 0);
	platform_device_register_data(&platform_bus, "leds-gpio", 0,
	platform_device_register_data(NULL, "leds-gpio", 0,
				      &p720t_gpio_led_pdata,
				      sizeof(p720t_gpio_led_pdata));
}
+1 −1
Original line number Diff line number Diff line
@@ -245,7 +245,7 @@ static void __init mx27ads_regulator_init(void)
	vchip->set		= vgpio_set;
	gpiochip_add(vchip);

	platform_device_register_data(&platform_bus, "reg-fixed-voltage",
	platform_device_register_data(NULL, "reg-fixed-voltage",
				      PLATFORM_DEVID_AUTO,
				      &mx27ads_lcd_regulator_pdata,
				      sizeof(mx27ads_lcd_regulator_pdata));
Loading