diff options
-rw-r--r-- | drivers/video/fbdev/omap2/dss/hdmi_wp.c | 21 |
1 files changed, 3 insertions, 18 deletions
diff --git a/drivers/video/fbdev/omap2/dss/hdmi_wp.c b/drivers/video/fbdev/omap2/dss/hdmi_wp.c index a16a190e191d..b4520972ef3e 100644 --- a/drivers/video/fbdev/omap2/dss/hdmi_wp.c +++ b/drivers/video/fbdev/omap2/dss/hdmi_wp.c | |||
@@ -243,29 +243,14 @@ int hdmi_wp_audio_core_req_enable(struct hdmi_wp_data *wp, bool enable) | |||
243 | int hdmi_wp_init(struct platform_device *pdev, struct hdmi_wp_data *wp) | 243 | int hdmi_wp_init(struct platform_device *pdev, struct hdmi_wp_data *wp) |
244 | { | 244 | { |
245 | struct resource *res; | 245 | struct resource *res; |
246 | struct resource temp_res; | ||
247 | 246 | ||
248 | res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "wp"); | 247 | res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "wp"); |
249 | if (!res) { | 248 | if (!res) { |
250 | DSSDBG("can't get WP mem resource by name\n"); | 249 | DSSERR("can't get WP mem resource\n"); |
251 | /* | 250 | return -EINVAL; |
252 | * if hwmod/DT doesn't have the memory resource information | ||
253 | * split into HDMI sub blocks by name, we try again by getting | ||
254 | * the platform's first resource. this code will be removed when | ||
255 | * the driver can get the mem resources by name | ||
256 | */ | ||
257 | res = platform_get_resource(pdev, IORESOURCE_MEM, 0); | ||
258 | if (!res) { | ||
259 | DSSERR("can't get WP mem resource\n"); | ||
260 | return -EINVAL; | ||
261 | } | ||
262 | |||
263 | temp_res.start = res->start; | ||
264 | temp_res.end = temp_res.start + WP_SIZE - 1; | ||
265 | res = &temp_res; | ||
266 | } | 251 | } |
267 | 252 | ||
268 | wp->base = devm_ioremap(&pdev->dev, res->start, resource_size(res)); | 253 | wp->base = devm_ioremap_resource(&pdev->dev, res); |
269 | if (!wp->base) { | 254 | if (!wp->base) { |
270 | DSSERR("can't ioremap HDMI WP\n"); | 255 | DSSERR("can't ioremap HDMI WP\n"); |
271 | return -ENOMEM; | 256 | return -ENOMEM; |