Skip to content
Permalink
Browse files
gpio: mxc: Remove unused .id_table support
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>
  • Loading branch information
fabioestevam authored and intel-lab-lkp committed Nov 16, 2020
1 parent 27b5ea2 commit a6943017beed6fb9b48fc297c02ac3f0f4e680cb
Showing 1 changed file with 6 additions and 29 deletions.
@@ -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);
@@ -376,11 +358,7 @@ static void mxc_gpio_get_hw(struct platform_device *pdev)
{
const struct of_device_id *of_id =
of_match_device(mxc_gpio_dt_ids, &pdev->dev);
enum mxc_gpio_hwtype hwtype;

if (of_id)
pdev->id_entry = of_id->data;
hwtype = pdev->id_entry->driver_data;
enum mxc_gpio_hwtype hwtype = (enum mxc_gpio_hwtype)of_id->data;

if (mxc_gpio_hwtype) {
/*
@@ -596,7 +574,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)

0 comments on commit a694301

Please sign in to comment.