]> git.ipfire.org Git - people/arne_f/kernel.git/commitdiff
mfd: ti_am335x_tscadc: Use PLATFORM_DEVID_AUTO while registering mfd cells
authorVignesh R <vigneshr@ti.com>
Mon, 3 Dec 2018 08:01:17 +0000 (13:31 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 27 Feb 2019 09:08:02 +0000 (10:08 +0100)
[ Upstream commit b40ee006fe6a8a25093434e5d394128c356a48f3 ]

Use PLATFORM_DEVID_AUTO to number mfd cells while registering, so that
different instances are uniquely identified. This is required in order
to support registering of multiple instances of same ti_am335x_tscadc IP.

Signed-off-by: Vignesh R <vigneshr@ti.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/mfd/ti_am335x_tscadc.c

index 7dc1cbcd2fb8951150c633290b02392c4f041543..5894d6c16fab854dbf8af4ed060d4813e6ed6343 100644 (file)
@@ -265,8 +265,9 @@ static      int ti_tscadc_probe(struct platform_device *pdev)
                cell->pdata_size = sizeof(tscadc);
        }
 
-       err = mfd_add_devices(&pdev->dev, pdev->id, tscadc->cells,
-                       tscadc->used_cells, NULL, 0, NULL);
+       err = mfd_add_devices(&pdev->dev, PLATFORM_DEVID_AUTO,
+                             tscadc->cells, tscadc->used_cells, NULL,
+                             0, NULL);
        if (err < 0)
                goto err_disable_clk;