diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2022-12-14 13:35:09 +0100 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2023-01-10 15:43:47 +0100 |
commit | c0afc799fb9a19a11f651596fe23b4b755593887 (patch) | |
tree | 9c27f1533193d31757744b22b2af9186d23e67ed /arch/sandbox | |
parent | e70b9d7a74698f1374244b2251216428db920aed (diff) | |
download | barebox-c0afc799fb9a19a11f651596fe23b4b755593887.tar.gz barebox-c0afc799fb9a19a11f651596fe23b4b755593887.tar.xz |
Rename struct device_d to device
The '_d' suffix was originally introduced in case we want to import
Linux struct device as a separate struct into barebox. Over time it
became clear that this won't happen, instead barebox struct device_d
is basically the same as Linux struct device. Rename the struct name
accordingly to make porting Linux code easier.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Reviewed-by: Marco Felsch <m.felsch@pengutronix.de>
Link: https://lore.barebox.org/20221214123512.189688-3-s.hauer@pengutronix.de
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch/sandbox')
-rw-r--r-- | arch/sandbox/board/board.c | 8 | ||||
-rw-r--r-- | arch/sandbox/board/console.c | 4 | ||||
-rw-r--r-- | arch/sandbox/board/devices.c | 4 | ||||
-rw-r--r-- | arch/sandbox/board/hostfile.c | 4 | ||||
-rw-r--r-- | arch/sandbox/board/led.c | 4 | ||||
-rw-r--r-- | arch/sandbox/board/power.c | 2 | ||||
-rw-r--r-- | arch/sandbox/board/watchdog.c | 2 | ||||
-rw-r--r-- | arch/sandbox/mach-sandbox/include/mach/linux.h | 4 |
8 files changed, 16 insertions, 16 deletions
diff --git a/arch/sandbox/board/board.c b/arch/sandbox/board/board.c index 43e355afe8..7857ede5c6 100644 --- a/arch/sandbox/board/board.c +++ b/arch/sandbox/board/board.c @@ -29,23 +29,23 @@ struct fb_videomode mode = { .yres = 480, }; -static struct device_d tap_device = { +static struct device tap_device = { .id = DEVICE_ID_DYNAMIC, .name = "tap", }; -static struct device_d sdl_device = { +static struct device sdl_device = { .id = DEVICE_ID_DYNAMIC, .name = "sdlfb", .platform_data = &mode, }; -static struct device_d devrandom_device = { +static struct device devrandom_device = { .id = DEVICE_ID_DYNAMIC, .name = "devrandom", }; -static int devices_init(struct device_d *dev) +static int devices_init(struct device *dev) { platform_device_register(&tap_device); diff --git a/arch/sandbox/board/console.c b/arch/sandbox/board/console.c index cea62d57b1..274ef67aef 100644 --- a/arch/sandbox/board/console.c +++ b/arch/sandbox/board/console.c @@ -21,10 +21,10 @@ int barebox_register_console(int stdinfd, int stdoutfd) { - struct device_d *dev; + struct device *dev; struct linux_console_data *data; - dev = xzalloc(sizeof(struct device_d) + sizeof(struct linux_console_data)); + dev = xzalloc(sizeof(struct device) + sizeof(struct linux_console_data)); data = (struct linux_console_data *)(dev + 1); diff --git a/arch/sandbox/board/devices.c b/arch/sandbox/board/devices.c index f7305a8ead..ecd24e9207 100644 --- a/arch/sandbox/board/devices.c +++ b/arch/sandbox/board/devices.c @@ -14,7 +14,7 @@ unsigned char __pci_iobase[IO_SPACE_LIMIT]; static LIST_HEAD(sandbox_device_list); -int sandbox_add_device(struct device_d *dev) +int sandbox_add_device(struct device *dev) { list_add(&dev->list, &sandbox_device_list); @@ -23,7 +23,7 @@ int sandbox_add_device(struct device_d *dev) static int sandbox_device_init(void) { - struct device_d *dev, *tmp; + struct device *dev, *tmp; list_for_each_entry_safe(dev, tmp, &sandbox_device_list, list) { /* reset the list_head before registering for real */ diff --git a/arch/sandbox/board/hostfile.c b/arch/sandbox/board/hostfile.c index d04925d6d4..a6273664d3 100644 --- a/arch/sandbox/board/hostfile.c +++ b/arch/sandbox/board/hostfile.c @@ -89,14 +89,14 @@ static struct block_device_ops hf_blk_ops = { .write = hf_blk_write, }; -static void hf_info(struct device_d *dev) +static void hf_info(struct device *dev) { struct hf_priv *priv = dev->priv; printf("file: %s\n", priv->filename); } -static int hf_probe(struct device_d *dev) +static int hf_probe(struct device *dev) { struct device_node *np = dev->of_node; struct hf_priv *priv = xzalloc(sizeof(*priv)); diff --git a/arch/sandbox/board/led.c b/arch/sandbox/board/led.c index a4d5b3e89a..02f181b382 100644 --- a/arch/sandbox/board/led.c +++ b/arch/sandbox/board/led.c @@ -26,7 +26,7 @@ static void sandbox_led_set(struct led *led, unsigned int brightness) sandbox_led.active = true; } -static int sandbox_led_of_probe(struct device_d *dev) +static int sandbox_led_of_probe(struct device *dev) { struct device_node *np = dev->of_node; int ret; @@ -47,7 +47,7 @@ static int sandbox_led_of_probe(struct device_d *dev) return 0; } -static void sandbox_led_of_remove(struct device_d *dev) +static void sandbox_led_of_remove(struct device *dev) { if (sandbox_led.active) sandbox_led_set(NULL, 0); diff --git a/arch/sandbox/board/power.c b/arch/sandbox/board/power.c index 071a7fd907..ba5ab88a81 100644 --- a/arch/sandbox/board/power.c +++ b/arch/sandbox/board/power.c @@ -38,7 +38,7 @@ static void sandbox_rst_reexec(struct restart_handler *rst) linux_reexec(); } -static int sandbox_power_probe(struct device_d *dev) +static int sandbox_power_probe(struct device *dev) { struct sandbox_power *power = xzalloc(sizeof(*power)); size_t len; diff --git a/arch/sandbox/board/watchdog.c b/arch/sandbox/board/watchdog.c index 24e556a918..d54661018d 100644 --- a/arch/sandbox/board/watchdog.c +++ b/arch/sandbox/board/watchdog.c @@ -36,7 +36,7 @@ static int sandbox_watchdog_set_timeout(struct watchdog *wdd, unsigned int timeo return 0; } -static int sandbox_watchdog_probe(struct device_d *dev) +static int sandbox_watchdog_probe(struct device *dev) { struct device_node *np = dev->of_node; struct sandbox_watchdog *wd; diff --git a/arch/sandbox/mach-sandbox/include/mach/linux.h b/arch/sandbox/mach-sandbox/include/mach/linux.h index 1584d8065c..028bc2fa90 100644 --- a/arch/sandbox/mach-sandbox/include/mach/linux.h +++ b/arch/sandbox/mach-sandbox/include/mach/linux.h @@ -5,9 +5,9 @@ struct hf_info; -struct device_d; +struct device; -int sandbox_add_device(struct device_d *dev); +int sandbox_add_device(struct device *dev); struct fb_bitfield; |