i2c: versatile: Convert to use resource managed devm_* APIs
authorAxel Lin <axel.lin@ingics.com>
Sat, 9 Jul 2016 05:32:23 +0000 (13:32 +0800)
committerWolfram Sang <wsa@the-dreams.de>
Thu, 14 Jul 2016 12:21:56 +0000 (21:21 +0900)
commitcc4618813e4bc409cd22641f6001118ef4479cfc
tree878b151e216af1b63434713090a4b38c94c58e41
parent9f6db9bfb58e0008c0d041d69cef3bcb6247dc52
i2c: versatile: Convert to use resource managed devm_* APIs

Use devm_* APIs to simplify the code a bit.
This patch also fixes the memory leak when unload the module.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Tested-by: Liviu Dudau <Liviu.Dudau@arm.com>
Acked-by: Liviu Dudau <Liviu.Dudau@arm.com>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
drivers/i2c/busses/i2c-versatile.c