On Sat, Jul 14, 2012 at 11:23:13PM +0200, Linus Walleij wrote: > 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@xxxxxxxxxx> > --- > ChangeLog v2->v3: > - Also delete the cached physical base and size from the state > holder struct. > ChangeLog v1->v2: > - Use more devm* stuff, at Wolfram's request. > - Note: based on a clean v3.5-rc6, may need some patch -p1 < patch > to apply on the i2c tree, if you want me to rebase it, just tell > me where to find the baseline. I can't apply this on top of your clk_prepare/unprepare patch. I tried to fix it but was unsure how to handle the clk_unprepare in the error path of probe. Could you fix it? (BTW as mentioned before, my next branch is here: git://git.pengutronix.de/git/wsa/linux.git i2c-embedded/for-next) Thanks, Wolfram -- Pengutronix e.K. | Wolfram Sang | Industrial Linux Solutions | http://www.pengutronix.de/ |
Attachment:
signature.asc
Description: Digital signature