From c0afc799fb9a19a11f651596fe23b4b755593887 Mon Sep 17 00:00:00 2001 From: Sascha Hauer Date: Wed, 14 Dec 2022 13:35:09 +0100 Subject: 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 Reviewed-by: Marco Felsch Link: https://lore.barebox.org/20221214123512.189688-3-s.hauer@pengutronix.de Signed-off-by: Sascha Hauer --- drivers/watchdog/ar9344_wdt.c | 4 ++-- drivers/watchdog/at91sam9_wdt.c | 2 +- drivers/watchdog/bcm2835_wdt.c | 4 ++-- drivers/watchdog/davinci_wdt.c | 2 +- drivers/watchdog/dw_wdt.c | 2 +- drivers/watchdog/efi_wdt.c | 4 ++-- drivers/watchdog/f71808e_wdt.c | 4 ++-- drivers/watchdog/gpio_wdt.c | 2 +- drivers/watchdog/im28wd.c | 4 ++-- drivers/watchdog/imxwd.c | 4 ++-- drivers/watchdog/jz4740.c | 2 +- drivers/watchdog/kvx_wdt.c | 2 +- drivers/watchdog/omap_wdt.c | 2 +- drivers/watchdog/orion_wdt.c | 2 +- drivers/watchdog/rave-sp-wdt.c | 2 +- drivers/watchdog/rn5t568_wdt.c | 2 +- drivers/watchdog/starfive_wdt.c | 2 +- drivers/watchdog/stm32_iwdg.c | 2 +- drivers/watchdog/stpmic1_wdt.c | 2 +- drivers/watchdog/wd_core.c | 4 ++-- drivers/watchdog/wdat_wdt.c | 2 +- 21 files changed, 28 insertions(+), 28 deletions(-) (limited to 'drivers/watchdog') diff --git a/drivers/watchdog/ar9344_wdt.c b/drivers/watchdog/ar9344_wdt.c index 3dd3197393..64bb591f55 100644 --- a/drivers/watchdog/ar9344_wdt.c +++ b/drivers/watchdog/ar9344_wdt.c @@ -29,7 +29,7 @@ struct ar9344_wd { struct watchdog wd; void __iomem *base; - struct device_d *dev; + struct device *dev; unsigned int rate; }; @@ -65,7 +65,7 @@ static void ar9344_watchdog_detect_reset_source(struct ar9344_wd *priv) /* else keep the default 'unknown' state */ } -static int ar9344_wdt_probe(struct device_d *dev) +static int ar9344_wdt_probe(struct device *dev) { struct resource *iores; struct ar9344_wd *priv; diff --git a/drivers/watchdog/at91sam9_wdt.c b/drivers/watchdog/at91sam9_wdt.c index 1bad10ee53..cd7703a4dd 100644 --- a/drivers/watchdog/at91sam9_wdt.c +++ b/drivers/watchdog/at91sam9_wdt.c @@ -54,7 +54,7 @@ static inline bool at91sam9x_wdt_is_disabled(struct at91sam9x_wdt *wdt) return readl(wdt->base + AT91_WDT_MR) & AT91_WDT_WDDIS; } -static int at91sam9x_wdt_probe(struct device_d *dev) +static int at91sam9x_wdt_probe(struct device *dev) { struct at91sam9x_wdt *wdt; struct resource *iores; diff --git a/drivers/watchdog/bcm2835_wdt.c b/drivers/watchdog/bcm2835_wdt.c index c6e6a289f2..78b5292c8a 100644 --- a/drivers/watchdog/bcm2835_wdt.c +++ b/drivers/watchdog/bcm2835_wdt.c @@ -21,7 +21,7 @@ struct bcm2835_wd { struct watchdog wd; void __iomem *base; - struct device_d *dev; + struct device *dev; struct restart_handler restart; }; @@ -60,7 +60,7 @@ static int bcm2835_wd_set_timeout(struct watchdog *wd, unsigned timeout) return 0; } -static int bcm2835_wd_probe(struct device_d *dev) +static int bcm2835_wd_probe(struct device *dev) { struct resource *iores; struct bcm2835_wd *priv; diff --git a/drivers/watchdog/davinci_wdt.c b/drivers/watchdog/davinci_wdt.c index d632573ba7..f5bc83d662 100644 --- a/drivers/watchdog/davinci_wdt.c +++ b/drivers/watchdog/davinci_wdt.c @@ -127,7 +127,7 @@ static int davinci_wdt_set_timeout(struct watchdog *wd, unsigned timeout) return 0; } -static int davinci_wdt_probe(struct device_d *dev) +static int davinci_wdt_probe(struct device *dev) { struct resource *iores; int ret = 0; diff --git a/drivers/watchdog/dw_wdt.c b/drivers/watchdog/dw_wdt.c index ad95b4a57e..3c26eef8e2 100644 --- a/drivers/watchdog/dw_wdt.c +++ b/drivers/watchdog/dw_wdt.c @@ -128,7 +128,7 @@ static void __noreturn dw_wdt_restart_handle(struct restart_handler *rst) hang(); } -static int dw_wdt_drv_probe(struct device_d *dev) +static int dw_wdt_drv_probe(struct device *dev) { struct watchdog *wdd; struct dw_wdt *dw_wdt; diff --git a/drivers/watchdog/efi_wdt.c b/drivers/watchdog/efi_wdt.c index eb50f24aed..2203d6dfbc 100644 --- a/drivers/watchdog/efi_wdt.c +++ b/drivers/watchdog/efi_wdt.c @@ -12,7 +12,7 @@ struct efi_wdt_priv { struct watchdog wd; - struct device_d *dev; + struct device *dev; }; #define to_efi_wdt(h) container_of(h, struct efi_wdt_priv, wd) @@ -31,7 +31,7 @@ static int efi_wdt_set_timeout(struct watchdog *wd, unsigned timeout) return 0; } -static int efi_wdt_probe(struct device_d *dev) +static int efi_wdt_probe(struct device *dev) { struct efi_wdt_priv *priv; int ret; diff --git a/drivers/watchdog/f71808e_wdt.c b/drivers/watchdog/f71808e_wdt.c index b2cf0f8ddd..543f535151 100644 --- a/drivers/watchdog/f71808e_wdt.c +++ b/drivers/watchdog/f71808e_wdt.c @@ -239,7 +239,7 @@ static int f71808e_wdt_set_timeout(struct watchdog *wdd, unsigned int new_timeou return 0; } -static int f71808e_wdt_init(struct f71808e_wdt *wd, struct device_d *dev) +static int f71808e_wdt_init(struct f71808e_wdt *wd, struct device *dev) { struct watchdog *wdd = &wd->wdd; const char * const *names = pulse_width_names; @@ -376,7 +376,7 @@ static struct platform_device_id f71808e_wdt_ids[] = { { /* sentinel */ }, }; -static int f71808e_probe(struct device_d *dev) +static int f71808e_probe(struct device *dev) { struct f71808e_wdt *wd; struct resource *res; diff --git a/drivers/watchdog/gpio_wdt.c b/drivers/watchdog/gpio_wdt.c index c5da28467b..7e5203a261 100644 --- a/drivers/watchdog/gpio_wdt.c +++ b/drivers/watchdog/gpio_wdt.c @@ -81,7 +81,7 @@ static int gpio_wdt_set_timeout(struct watchdog *wdd, unsigned int new_timeout) return 0; } -static int gpio_wdt_probe(struct device_d *dev) +static int gpio_wdt_probe(struct device *dev) { struct device_node *np = dev->of_node; struct gpio_wdt_priv *priv; diff --git a/drivers/watchdog/im28wd.c b/drivers/watchdog/im28wd.c index efe26f42d8..c1b4b933d3 100644 --- a/drivers/watchdog/im28wd.c +++ b/drivers/watchdog/im28wd.c @@ -175,7 +175,7 @@ static void __maybe_unused imx28_detect_reset_source(const struct imx28_wd *p) reset_source_set(RESET_RST); } -static int imx28_wd_probe(struct device_d *dev) +static int imx28_wd_probe(struct device *dev) { struct resource *iores; struct imx28_wd *priv; @@ -213,7 +213,7 @@ on_error: return rc; } -static void imx28_wd_remove(struct device_d *dev) +static void imx28_wd_remove(struct device *dev) { struct imx28_wd *priv= dev->priv; watchdog_deregister(&priv->wd); diff --git a/drivers/watchdog/imxwd.c b/drivers/watchdog/imxwd.c index 0cc1d07ba2..a29999cbca 100644 --- a/drivers/watchdog/imxwd.c +++ b/drivers/watchdog/imxwd.c @@ -27,7 +27,7 @@ struct imx_wd_ops { struct imx_wd { struct watchdog wd; void __iomem *base; - struct device_d *dev; + struct device *dev; const struct imx_wd_ops *ops; struct restart_handler restart; struct restart_handler restart_warm; @@ -237,7 +237,7 @@ static int imx21_wd_init(struct imx_wd *priv) return imx21_wd_init_no_warm_reset(priv); } -static int imx_wd_probe(struct device_d *dev) +static int imx_wd_probe(struct device *dev) { struct resource *iores; struct imx_wd *priv; diff --git a/drivers/watchdog/jz4740.c b/drivers/watchdog/jz4740.c index ed38ba7bd8..a8afbbf00a 100644 --- a/drivers/watchdog/jz4740.c +++ b/drivers/watchdog/jz4740.c @@ -60,7 +60,7 @@ static void __noreturn jz4740_reset_soc(struct restart_handler *rst) hang(); } -static int jz4740_wdt_probe(struct device_d *dev) +static int jz4740_wdt_probe(struct device *dev) { struct resource *iores; struct jz4740_wdt_drvdata *priv; diff --git a/drivers/watchdog/kvx_wdt.c b/drivers/watchdog/kvx_wdt.c index df9430769b..56bc851675 100644 --- a/drivers/watchdog/kvx_wdt.c +++ b/drivers/watchdog/kvx_wdt.c @@ -48,7 +48,7 @@ static int kvx_wdt_set_timeout(struct watchdog *wdd, unsigned int timeout) static int count; -static int kvx_wdt_drv_probe(struct device_d *dev) +static int kvx_wdt_drv_probe(struct device *dev) { struct watchdog *wdd; struct clk *clk; diff --git a/drivers/watchdog/omap_wdt.c b/drivers/watchdog/omap_wdt.c index b61d77aaee..80006bfb3d 100644 --- a/drivers/watchdog/omap_wdt.c +++ b/drivers/watchdog/omap_wdt.c @@ -150,7 +150,7 @@ static int omap_wdt_set_timeout(struct watchdog *wdog, return 0; } -static int omap_wdt_probe(struct device_d *dev) +static int omap_wdt_probe(struct device *dev) { struct resource *iores; struct omap_wdt_dev *wdev; diff --git a/drivers/watchdog/orion_wdt.c b/drivers/watchdog/orion_wdt.c index 6b7614ef7c..ba69933009 100644 --- a/drivers/watchdog/orion_wdt.c +++ b/drivers/watchdog/orion_wdt.c @@ -68,7 +68,7 @@ static int armada_xp_set_timeout(struct watchdog *wd, unsigned timeout) return 0; } -static int orion_wdt_probe(struct device_d *dev) +static int orion_wdt_probe(struct device *dev) { struct orion_wdt_ddata* ddata; struct resource *res_timer, *res_rstout; diff --git a/drivers/watchdog/rave-sp-wdt.c b/drivers/watchdog/rave-sp-wdt.c index f5531d9d37..0e41655024 100644 --- a/drivers/watchdog/rave-sp-wdt.c +++ b/drivers/watchdog/rave-sp-wdt.c @@ -302,7 +302,7 @@ static int rave_sp_wdt_add_params(struct rave_sp_wdt *sp_wd) return PTR_ERR_OR_ZERO(p); } -static int rave_sp_wdt_probe(struct device_d *dev) +static int rave_sp_wdt_probe(struct device *dev) { struct rave_sp_wdt *sp_wd; const char *reset_reason; diff --git a/drivers/watchdog/rn5t568_wdt.c b/drivers/watchdog/rn5t568_wdt.c index a6443609e2..e7db8f088d 100644 --- a/drivers/watchdog/rn5t568_wdt.c +++ b/drivers/watchdog/rn5t568_wdt.c @@ -107,7 +107,7 @@ static int rn5t568_wdt_set_timeout(struct watchdog *wdd, unsigned int timeout) return ret; } -static int rn5t568_wdt_probe(struct device_d *dev) +static int rn5t568_wdt_probe(struct device *dev) { struct rn5t568_wdt *wdt; struct watchdog *wdd; diff --git a/drivers/watchdog/starfive_wdt.c b/drivers/watchdog/starfive_wdt.c index 6779566fd6..354e62ea47 100644 --- a/drivers/watchdog/starfive_wdt.c +++ b/drivers/watchdog/starfive_wdt.c @@ -44,7 +44,7 @@ static int starfive_wdt_set_timeout(struct watchdog *wdd, unsigned int timeout) return 0; } -static int starfive_wdt_drv_probe(struct device_d *dev) +static int starfive_wdt_drv_probe(struct device *dev) { struct starfive_wdt *wd; struct resource *iores; diff --git a/drivers/watchdog/stm32_iwdg.c b/drivers/watchdog/stm32_iwdg.c index 4d7a263b7e..3f589d485a 100644 --- a/drivers/watchdog/stm32_iwdg.c +++ b/drivers/watchdog/stm32_iwdg.c @@ -126,7 +126,7 @@ static const struct of_device_id stm32_iwdg_of_match[] = { { /* sentinel */ } }; -static int stm32_iwdg_probe(struct device_d *dev) +static int stm32_iwdg_probe(struct device *dev) { struct stm32_iwdg_data *data; struct stm32_iwdg *wd; diff --git a/drivers/watchdog/stpmic1_wdt.c b/drivers/watchdog/stpmic1_wdt.c index 105ba39fb7..fea01c0a04 100644 --- a/drivers/watchdog/stpmic1_wdt.c +++ b/drivers/watchdog/stpmic1_wdt.c @@ -157,7 +157,7 @@ static int stpmic1_set_reset_reason(struct regmap *map) return 0; } -static int stpmic1_wdt_probe(struct device_d *dev) +static int stpmic1_wdt_probe(struct device *dev) { struct stpmic1_wdt *wdt; struct watchdog *wdd; diff --git a/drivers/watchdog/wd_core.c b/drivers/watchdog/wd_core.c index a872580d78..89e4f1d1ea 100644 --- a/drivers/watchdog/wd_core.c +++ b/drivers/watchdog/wd_core.c @@ -139,7 +139,7 @@ static int watchdog_register_dev(struct watchdog *wd, const char *name, int id) * * return: The priority */ -static unsigned int dev_get_watchdog_priority(struct device_d *dev) +static unsigned int dev_get_watchdog_priority(struct device *dev) { unsigned int priority = WATCHDOG_DEFAULT_PRIORITY; @@ -329,7 +329,7 @@ EXPORT_SYMBOL(watchdog_get_alias_id_from); struct watchdog *watchdog_get_by_name(const char *name) { struct watchdog *tmp; - struct device_d *dev = get_device_by_name(name); + struct device *dev = get_device_by_name(name); if (!dev) return NULL; diff --git a/drivers/watchdog/wdat_wdt.c b/drivers/watchdog/wdat_wdt.c index f58aee1283..522f1c25f1 100644 --- a/drivers/watchdog/wdat_wdt.c +++ b/drivers/watchdog/wdat_wdt.c @@ -382,7 +382,7 @@ static int wdat_wdt_enable_reboot(struct wdat_wdt *wdat) return 0; } -static int wdat_wdt_probe(struct device_d *const dev) +static int wdat_wdt_probe(struct device *const dev) { const struct acpi_wdat_entry *entries; struct acpi_table_wdat *tbl; -- cgit v1.2.3