i2s: hi6210: bug fixes
Changed:
1. return value checking of devm_ioremap_resource(). It returns a pointer
to the remapped memory or an ERR_PTR() encoded error code on failure.
So, the original return value checking against NULL is wrong.
2. for i2s->base_syscon = devm_ioremap_resource(),
change it to devm_ioremap(). Without this change, I got below error:
[ 0.630475] hi6210_i2s f7118000.hi6210_i2s: can't request region
for resource [mem 0xf7030000-0xf70303ff]
[ 0.630586] hi6210_i2s f7118000.hi6210_i2s: ioremap failed
[ 0.630659] hi6210_i2s: probe of f7118000.hi6210_i2s failed with error -16
devm_ioremap_resource() cannot be used if that's NOT the first time
this mem.resource being requested, and so we see devm_request_mem_region()
fails with error -16 (-EBUSY).
Signed-off-by:
Guodong Xu <guodong.xu@linaro.org>
Loading
Please sign in to comment