All of lore.kernel.org
 help / color / mirror / Atom feed
From: Philipp Zabel <p.zabel@pengutronix.de>
To: Fabio Estevam <festevam@gmail.com>, linus.walleij@linaro.org
Cc: linux-gpio@vger.kernel.org, kernel@pengutronix.de
Subject: Re: [PATCH] gpio: mxc: Remove unused .id_table support
Date: Mon, 16 Nov 2020 17:15:29 +0100	[thread overview]
Message-ID: <65af91dc19822f5f164f23c3bc558a5d1b136440.camel@pengutronix.de> (raw)
In-Reply-To: <20201116154407.15179-1-festevam@gmail.com>

Hi Fabio,

On Mon, 2020-11-16 at 12:44 -0300, Fabio Estevam wrote:
> Since 5.10-rc1 i.MX is a devicetree-only platform and the existing
> .id_table support in this driver was only useful for old non-devicetree
> platforms.
> 
> Get rid of the .id_table since it is no longer used.
> 
> Signed-off-by: Fabio Estevam <festevam@gmail.com>
> ---
>  drivers/gpio/gpio-mxc.c | 29 +++++------------------------
>  1 file changed, 5 insertions(+), 24 deletions(-)
> 
> diff --git a/drivers/gpio/gpio-mxc.c b/drivers/gpio/gpio-mxc.c
> index 643f4c557ac2..aadc11064b74 100644
> --- a/drivers/gpio/gpio-mxc.c
> +++ b/drivers/gpio/gpio-mxc.c
> @@ -133,30 +133,12 @@ static struct mxc_gpio_hwdata *mxc_gpio_hwdata;
>  #define GPIO_INT_FALL_EDGE	(mxc_gpio_hwdata->fall_edge)
>  #define GPIO_INT_BOTH_EDGES	0x4
>  
> -static const struct platform_device_id mxc_gpio_devtype[] = {
> -	{
> -		.name = "imx1-gpio",
> -		.driver_data = IMX1_GPIO,
> -	}, {
> -		.name = "imx21-gpio",
> -		.driver_data = IMX21_GPIO,
> -	}, {
> -		.name = "imx31-gpio",
> -		.driver_data = IMX31_GPIO,
> -	}, {
> -		.name = "imx35-gpio",
> -		.driver_data = IMX35_GPIO,
> -	}, {
> -		/* sentinel */
> -	}
> -};
> -
>  static const struct of_device_id mxc_gpio_dt_ids[] = {
> -	{ .compatible = "fsl,imx1-gpio", .data = &mxc_gpio_devtype[IMX1_GPIO], },
> -	{ .compatible = "fsl,imx21-gpio", .data = &mxc_gpio_devtype[IMX21_GPIO], },
> -	{ .compatible = "fsl,imx31-gpio", .data = &mxc_gpio_devtype[IMX31_GPIO], },
> -	{ .compatible = "fsl,imx35-gpio", .data = &mxc_gpio_devtype[IMX35_GPIO], },
> -	{ .compatible = "fsl,imx7d-gpio", .data = &mxc_gpio_devtype[IMX35_GPIO], },
> +	{ .compatible = "fsl,imx1-gpio", .data = (const void *)IMX1_GPIO },
> +	{ .compatible = "fsl,imx21-gpio", .data = (const void *)IMX21_GPIO },
> +	{ .compatible = "fsl,imx31-gpio", .data = (const void *)IMX31_GPIO },
> +	{ .compatible = "fsl,imx35-gpio", .data = (const void *)IMX35_GPIO },
> +	{ .compatible = "fsl,imx7d-gpio", .data = (const void *)IMX35_GPIO },
>  	{ /* sentinel */ }
>  };
>  MODULE_DEVICE_TABLE(of, mxc_gpio_dt_ids);
> @@ -596,7 +578,6 @@ static struct platform_driver mxc_gpio_driver = {
>  		.suppress_bind_attrs = true,
>  	},
>  	.probe		= mxc_gpio_probe,
> -	.id_table	= mxc_gpio_devtype,
>  };
>  
>  static int __init gpio_mxc_init(void)

This seems to be missing conversion of the code that uses the matched
of_device_id. That currently has to expect .data to be a pointer to
struct platform_device_id.

regards
Philipp

  reply	other threads:[~2020-11-16 16:15 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-16 15:44 [PATCH] gpio: mxc: Remove unused .id_table support Fabio Estevam
2020-11-16 16:15 ` Philipp Zabel [this message]
2020-11-16 17:55   ` Fabio Estevam

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=65af91dc19822f5f164f23c3bc558a5d1b136440.camel@pengutronix.de \
    --to=p.zabel@pengutronix.de \
    --cc=festevam@gmail.com \
    --cc=kernel@pengutronix.de \
    --cc=linus.walleij@linaro.org \
    --cc=linux-gpio@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.