Skip to content

Commit d54bbaf

Browse files
Heikki Krogerusjmberg-intel
authored andcommitted
ARM: tegra: use build-in device properties with rfkill_gpio
Pass the rfkill name and type to the device with properties instead of driver specific platform data. Signed-off-by: Heikki Krogerus <[email protected]> CC: Alexandre Courbot <[email protected]> CC: Thierry Reding <[email protected]> CC: Stephen Warren <[email protected]> Acked-by: Thierry Reding <[email protected]> Tested-by: Marc Dietrich <[email protected]> Acked-by: Arnd Bergmann <[email protected]> Signed-off-by: Johannes Berg <[email protected]>
1 parent 7d5e973 commit d54bbaf

File tree

1 file changed

+10
-7
lines changed

1 file changed

+10
-7
lines changed

arch/arm/mach-tegra/board-paz00.c

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,23 +17,25 @@
1717
*
1818
*/
1919

20+
#include <linux/property.h>
2021
#include <linux/gpio/machine.h>
2122
#include <linux/platform_device.h>
22-
#include <linux/rfkill-gpio.h>
2323

2424
#include "board.h"
2525

26-
static struct rfkill_gpio_platform_data wifi_rfkill_platform_data = {
27-
.name = "wifi_rfkill",
28-
.type = RFKILL_TYPE_WLAN,
26+
static struct property_entry __initdata wifi_rfkill_prop[] = {
27+
PROPERTY_ENTRY_STRING("name", "wifi_rfkill"),
28+
PROPERTY_ENTRY_STRING("type", "wlan"),
29+
{ },
30+
};
31+
32+
static struct property_set __initdata wifi_rfkill_pset = {
33+
.properties = wifi_rfkill_prop,
2934
};
3035

3136
static struct platform_device wifi_rfkill_device = {
3237
.name = "rfkill_gpio",
3338
.id = -1,
34-
.dev = {
35-
.platform_data = &wifi_rfkill_platform_data,
36-
},
3739
};
3840

3941
static struct gpiod_lookup_table wifi_gpio_lookup = {
@@ -47,6 +49,7 @@ static struct gpiod_lookup_table wifi_gpio_lookup = {
4749

4850
void __init tegra_paz00_wifikill_init(void)
4951
{
52+
platform_device_add_properties(&wifi_rfkill_device, &wifi_rfkill_pset);
5053
gpiod_add_lookup_table(&wifi_gpio_lookup);
5154
platform_device_register(&wifi_rfkill_device);
5255
}

0 commit comments

Comments
 (0)