Re: [PATCH v1 1/8] ARM: imx6sx: udoo-neo: port to driver model

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Jan 13, 2023 at 12:34:00PM +0100, Oleksij Rempel wrote:
> Port board code to the driver model
> 
> Signed-off-by: Oleksij Rempel <o.rempel@xxxxxxxxxxxxxx>
> ---
>  arch/arm/boards/udoo-neo/board.c | 18 +++++++++++++-----
>  1 file changed, 13 insertions(+), 5 deletions(-)

Applied, thanks

Sascha

> 
> diff --git a/arch/arm/boards/udoo-neo/board.c b/arch/arm/boards/udoo-neo/board.c
> index 5964e92159..3bed20ae50 100644
> --- a/arch/arm/boards/udoo-neo/board.c
> +++ b/arch/arm/boards/udoo-neo/board.c
> @@ -5,13 +5,21 @@
>  #include <init.h>
>  #include <linux/clk.h>
>  
> -static int imx6sx_udoneo_coredevices_init(void)
> +static int imx6sx_udoneo_probe(struct device *dev)
>  {
> -	if (!of_machine_is_compatible("fsl,imx6sx-udoo-neo"))
> -		return 0;
> -
>  	barebox_set_hostname("mx6sx-udooneo");
>  
>  	return 0;
>  }
> -coredevice_initcall(imx6sx_udoneo_coredevices_init);
> +
> +static const struct of_device_id imx6sx_udoneo_of_match[] = {
> +	{ .compatible = "fsl,imx6sx-udoo-neo" },
> +	{ /* sentinel */ },
> +};
> +
> +static struct driver imx6sx_udoneo_driver = {
> +	.name = "board-udoo-neo",
> +	.probe = imx6sx_udoneo_probe,
> +	.of_compatible = imx6sx_udoneo_of_match,
> +};
> +postcore_platform_driver(imx6sx_udoneo_driver);
> -- 
> 2.30.2
> 
> 
> 

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |




[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux