Messages in this thread | | | From | Stephen Boyd <> | Date | Thu, 22 Jul 2021 20:06:58 +0000 | Subject | Re: [PATCH 2/5] drm/msm/dp: Use devres for ioremap() |
| |
Quoting Bjorn Andersson (2021-07-21 19:42:24) > The non-devres version of ioremap is used, which requires manual > cleanup. But the code paths leading here is mixed with other devres > users, so rely on this for ioremap as well to simplify the code. > > Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org> > ---
Reviewed-by: Stephen Boyd <swboyd@chromium.org>
> drivers/gpu/drm/msm/dp/dp_parser.c | 29 ++++------------------------- > 1 file changed, 4 insertions(+), 25 deletions(-) > > diff --git a/drivers/gpu/drm/msm/dp/dp_parser.c b/drivers/gpu/drm/msm/dp/dp_parser.c > index 0519dd3ac3c3..c064ced78278 100644 > --- a/drivers/gpu/drm/msm/dp/dp_parser.c > +++ b/drivers/gpu/drm/msm/dp/dp_parser.c > @@ -32,7 +32,7 @@ static int msm_dss_ioremap(struct platform_device *pdev, > } > > io_data->len = (u32)resource_size(res); > - io_data->base = ioremap(res->start, io_data->len); > + io_data->base = devm_ioremap(&pdev->dev, res->start, io_data->len); > if (!io_data->base) { > DRM_ERROR("%pS->%s: ioremap failed\n", > __builtin_return_address(0), __func__);
I don't think we need this print either, but that can come later in addition to using devm_platform_get_and_ioremap_resource().
| |