OSDN Git Service

i2c: print correct device invalid address
authorJohn Garry <john.garry@huawei.com>
Fri, 6 Jan 2017 11:02:57 +0000 (19:02 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 19 Jan 2017 19:18:02 +0000 (20:18 +0100)
commit93c94ec23faeea8d9a501b6188c701fc282672b1
tree32fd1c68bb0f9de07ed179690f42d937cbefe766
parent61a8c3372adbfc64ee9bcae400908656602c3a92
i2c: print correct device invalid address

commit 6f724fb3039522486fce2e32e4c0fbe238a6ab02 upstream.

In of_i2c_register_device(), when the check for
device address validity fails we print the info.addr,
which has not been assigned properly.

Fix this by printing the actual invalid address.

Signed-off-by: John Garry <john.garry@huawei.com>
Reviewed-by: Vladimir Zapolskiy <vz@mleia.com>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Fixes: b4e2f6ac1281 ("i2c: apply DT flags when probing")
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/i2c/i2c-core.c