mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-01-17 18:36:00 +00:00
drm/stm: dsi: Use devm_platform_ioremap_resource()
Convert platform_get_resource(),devm_ioremap_resource() to a single call to devm_platform_ioremap_resource(), as this is exactly what this function does. Signed-off-by: Yang Li <yang.lee@linux.alibaba.com> Acked-by: Raphael Gallais-Pou <raphael.gallais-pou@foss.st.com> Signed-off-by: Philippe Cornu <philippe.cornu@foss.st.com> Link: https://patchwork.freedesktop.org/patch/msgid/20230421083402.21364-1-yang.lee@linux.alibaba.com
This commit is contained in:
parent
35070674f4
commit
34235f54b0
@ -444,15 +444,13 @@ static int dw_mipi_dsi_stm_probe(struct platform_device *pdev)
|
|||||||
struct device *dev = &pdev->dev;
|
struct device *dev = &pdev->dev;
|
||||||
struct dw_mipi_dsi_stm *dsi;
|
struct dw_mipi_dsi_stm *dsi;
|
||||||
struct clk *pclk;
|
struct clk *pclk;
|
||||||
struct resource *res;
|
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
dsi = devm_kzalloc(dev, sizeof(*dsi), GFP_KERNEL);
|
dsi = devm_kzalloc(dev, sizeof(*dsi), GFP_KERNEL);
|
||||||
if (!dsi)
|
if (!dsi)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
|
|
||||||
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
|
dsi->base = devm_platform_ioremap_resource(pdev, 0);
|
||||||
dsi->base = devm_ioremap_resource(dev, res);
|
|
||||||
if (IS_ERR(dsi->base)) {
|
if (IS_ERR(dsi->base)) {
|
||||||
ret = PTR_ERR(dsi->base);
|
ret = PTR_ERR(dsi->base);
|
||||||
DRM_ERROR("Unable to get dsi registers %d\n", ret);
|
DRM_ERROR("Unable to get dsi registers %d\n", ret);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user