i2c: stu300: use devm managed resources
authorLinus Walleij <linus.walleij@linaro.org>
Mon, 16 Jul 2012 11:30:12 +0000 (13:30 +0200)
committerWolfram Sang <w.sang@pengutronix.de>
Mon, 16 Jul 2012 11:48:51 +0000 (13:48 +0200)
commit6f535b94261b16343cfbc4576a941bd7901b96e1
tree4dd6d6e3183c030728b5cdf330b4c9ffa1dd7607
parent7326e38ffe894d0cd2904704b7d8c53d4a55d752
i2c: stu300: use devm managed resources

Allocate memory for device state using devm_kzalloc(), get the
clock using devm_clk_get(), get the IRQ using devm_request_irq(),
request and remap memory using devm_request_and_ioremap().
All to simplify accounting and letting the kernel do the
garbage-collection.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
drivers/i2c/busses/i2c-stu300.c