From: Jean Delvare <khali-PUYAD+kWke1g9hUCZPvPmw@public.gmane.org>
To: Bryan Wu <cooloney-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
Cc: i2c-GZX6beZjE8VD60Wz+7aTrA@public.gmane.org
Subject: Re: [PATCH 2/6] Blackfin I2C/TWI driver: Add platform_resource interface to support multi-port TWI controllers
Date: Mon, 24 Mar 2008 20:49:38 +0100 [thread overview]
Message-ID: <20080324204938.31350213@hyperion.delvare> (raw)
In-Reply-To: <1205479360-25240-3-git-send-email-cooloney-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
On Fri, 14 Mar 2008 00:22:36 -0700, Bryan Wu wrote:
> From: Bryan Wu <bryan.wu-OyLXuOCK7orQT0dZR+AlfA@public.gmane.org>
>
> - Dynamic alloc the resource of TWI driver data according to board information
> - TWI register read/write accessor based on dynamic regs_base
> - Support TWI0/TWI1 for BF54x
>
> Signed-off-by: Bryan Wu <bryan.wu-OyLXuOCK7orQT0dZR+AlfA@public.gmane.org>
> Signed-off-by: Bryan Wu <cooloney-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
> ---
> drivers/i2c/busses/i2c-bfin-twi.c | 281 +++++++++++++++++++++++--------------
> 1 files changed, 174 insertions(+), 107 deletions(-)
Looks good, except:
> diff --git a/drivers/i2c/busses/i2c-bfin-twi.c b/drivers/i2c/busses/i2c-bfin-twi.c
> index ea15125..515fe08 100644
> --- a/drivers/i2c/busses/i2c-bfin-twi.c
> +++ b/drivers/i2c/busses/i2c-bfin-twi.c
> (...)
> @@ -593,39 +646,55 @@ static int i2c_bfin_twi_probe(struct platform_device *dev)
> (...)
> + return 0;
> +
> +out_error_add_adapter:
> + free_irq(iface->irq, iface);
> +out_error_req_irq:
> +out_error_no_irq:
> + iounmap(iface->regs_base);
> +out_error_ioremap:
> +out_error_get_res:
> + kfree(iface);
> +out_error_nomem:
> return rc;
> }
You forgot to add the same steps when removing the device in
i2c_bfin_twi_remove(): you must call iounmap() and kfree() there too!
Also, it looks to me like this patch makes many bfin_read_TWI_* and
bfin_write_TWI_* macros in include/asm-blackfin/mach-bf537/cdefBF534.h
and include/asm-blackfin/mach-bf527/cdefBF52x_base.h unneeded, so it
would probably be a good idea to delete them now to avoid any confusion?
--
Jean Delvare
_______________________________________________
i2c mailing list
i2c-GZX6beZjE8VD60Wz+7aTrA@public.gmane.org
http://lists.lm-sensors.org/mailman/listinfo/i2c
next prev parent reply other threads:[~2008-03-24 19:49 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-03-12 16:27 [PATCH 2/6] Blackfin I2C/TWI driver: Add platform_resource interface to support multi-port TWI controllers Bryan Wu
[not found] ` <1205479360-25240-3-git-send-email-cooloney-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2008-03-24 19:49 ` Jean Delvare [this message]
[not found] ` <20080324204938.31350213-ig7AzVSIIG7kN2dkZ6Wm7A@public.gmane.org>
2008-03-25 3:16 ` Bryan Wu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20080324204938.31350213@hyperion.delvare \
--to=khali-puyad+kwke1g9huczpvpmw@public.gmane.org \
--cc=cooloney-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
--cc=i2c-GZX6beZjE8VD60Wz+7aTrA@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox