Commit aefe4b2e authored by Guodong Xu's avatar Guodong Xu
Browse files

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: default avatarGuodong Xu <guodong.xu@linaro.org>
parent ddb20956
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment