[PATCH v3 2/6] sysreset: Mark driver probe functions as static
Stefan Roese
sr at denx.de
Thu Nov 4 08:46:33 CET 2021
On 04.11.21 04:55, Samuel Holland wrote:
> These driver probe functions are not (and should not be) called from
> outside the respective driver source files. Therefore, the functions
> should be marked static.
>
> Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt at canonical.com>
> Signed-off-by: Samuel Holland <samuel at sholland.org>
Reviewed-by: Stefan Roese <sr at denx.de>
Thanks,
Stefan
> ---
>
> (no changes since v2)
>
> Changes in v2:
> - Also make gpio_reboot_probe function static.
>
> drivers/sysreset/sysreset_gpio.c | 2 +-
> drivers/sysreset/sysreset_resetctl.c | 2 +-
> drivers/sysreset/sysreset_syscon.c | 2 +-
> drivers/sysreset/sysreset_watchdog.c | 2 +-
> 4 files changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/sysreset/sysreset_gpio.c b/drivers/sysreset/sysreset_gpio.c
> index 680b759eb3..dfca10ccc8 100644
> --- a/drivers/sysreset/sysreset_gpio.c
> +++ b/drivers/sysreset/sysreset_gpio.c
> @@ -33,7 +33,7 @@ static struct sysreset_ops gpio_reboot_ops = {
> .request = gpio_reboot_request,
> };
>
> -int gpio_reboot_probe(struct udevice *dev)
> +static int gpio_reboot_probe(struct udevice *dev)
> {
> struct gpio_reboot_priv *priv = dev_get_priv(dev);
>
> diff --git a/drivers/sysreset/sysreset_resetctl.c b/drivers/sysreset/sysreset_resetctl.c
> index c039521eb4..25bd5c9a7f 100644
> --- a/drivers/sysreset/sysreset_resetctl.c
> +++ b/drivers/sysreset/sysreset_resetctl.c
> @@ -26,7 +26,7 @@ static struct sysreset_ops resetctl_reboot_ops = {
> .request = resetctl_reboot_request,
> };
>
> -int resetctl_reboot_probe(struct udevice *dev)
> +static int resetctl_reboot_probe(struct udevice *dev)
> {
> struct resetctl_reboot_priv *priv = dev_get_priv(dev);
>
> diff --git a/drivers/sysreset/sysreset_syscon.c b/drivers/sysreset/sysreset_syscon.c
> index 28fdfb0978..525faf2f89 100644
> --- a/drivers/sysreset/sysreset_syscon.c
> +++ b/drivers/sysreset/sysreset_syscon.c
> @@ -39,7 +39,7 @@ static struct sysreset_ops syscon_reboot_ops = {
> .request = syscon_reboot_request,
> };
>
> -int syscon_reboot_probe(struct udevice *dev)
> +static int syscon_reboot_probe(struct udevice *dev)
> {
> struct syscon_reboot_priv *priv = dev_get_priv(dev);
> int err;
> diff --git a/drivers/sysreset/sysreset_watchdog.c b/drivers/sysreset/sysreset_watchdog.c
> index 0dc2d8b9b6..c7ae368d41 100644
> --- a/drivers/sysreset/sysreset_watchdog.c
> +++ b/drivers/sysreset/sysreset_watchdog.c
> @@ -29,7 +29,7 @@ static struct sysreset_ops wdt_reboot_ops = {
> .request = wdt_reboot_request,
> };
>
> -int wdt_reboot_probe(struct udevice *dev)
> +static int wdt_reboot_probe(struct udevice *dev)
> {
> struct wdt_reboot_priv *priv = dev_get_priv(dev);
> int err;
>
Viele Grüße,
Stefan
--
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-51 Fax: (+49)-8142-66989-80 Email: sr at denx.de
More information about the U-Boot
mailing list