From: Sergei Shtylyov <sshtylyov-hkdhdckH98+B+jHODAdFcQ@public.gmane.org>
To: Ajay Kumar Gupta <ajay.gupta-l0cyMroinI0@public.gmane.org>
Cc: linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
davinci-linux-open-source-VycZQUHpC/PFrsHnngEfi1aTQe2KTcn/@public.gmane.org,
cooloney-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org,
felipe.balbi-xNZwKgViW5gAvxtiuMwx3w@public.gmane.org,
linux-omap-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
gadiyar-l0cyMroinI0@public.gmane.org
Subject: Re: [PATCH 2/8] musb: Get power (mA) from board data
Date: Tue, 17 Nov 2009 18:42:20 +0300 [thread overview]
Message-ID: <4B02C45C.4060407@ru.mvista.com> (raw)
In-Reply-To: <1258470596-24321-3-git-send-email-ajay.gupta-l0cyMroinI0@public.gmane.org>
Hello.
Ajay Kumar Gupta wrote:
> Different board may have different power sourcing capability and
> now with 'struct musb_hdrc_board_data' in place; pass this data
> from board files and also modify musb_core.c to get 'power' data
> from 'plat->board_data'.
This should be part of the patch 1/8 to keep the code compiling.
> Signed-off-by: Ajay Kumar Gupta <ajay.gupta-l0cyMroinI0@public.gmane.org>
> diff --git a/drivers/usb/musb/musb_core.c b/drivers/usb/musb/musb_core.c
> index 3a61ddb..818ccda 100644
> --- a/drivers/usb/musb/musb_core.c
> +++ b/drivers/usb/musb/musb_core.c
> @@ -2033,7 +2033,9 @@ bad_config:
> if (is_otg_enabled(musb))
> hcd->self.otg_port = 1;
> musb->xceiv->host = &hcd->self;
> - hcd->power_budget = 2 * (plat->power ? : 250);
> + if (plat->board_data)
> + hcd->power_budget =
> + 2 * (plat->board_data->power ? : 250);
Shouldn't it be:
+
+ hcd->power_budget = 2 * (plat->board_data &&
+ plat->board_data->power ?
+ plat->board_data->power : 250);
WBR, Sergei
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2009-11-17 15:42 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-11-17 15:09 [PATCH 0/8] musb: Add structure 'musb_hdrc_board_data' Ajay Kumar Gupta
2009-11-17 15:09 ` [PATCH 1/8] musb: Add structure to get board specific data Ajay Kumar Gupta
2009-11-17 15:09 ` [PATCH 2/8] musb: Get power (mA) from board data Ajay Kumar Gupta
2009-11-17 15:09 ` [PATCH 3/8] musb: Update musb_init() call for all OMAP3 boards Ajay Kumar Gupta
2009-11-17 15:09 ` [PATCH 4/8] musb: Update setup_usb() call for all Davinci boards Ajay Kumar Gupta
2009-11-17 15:09 ` [PATCH 5/8] musb: Add 'extvbus' in musb_hdrc_board_data Ajay Kumar Gupta
2009-11-17 15:09 ` [PATCH 6/8] musb: set 'extvbus = 0' for OMAP3 boards Ajay Kumar Gupta
2009-11-17 15:09 ` [PATCH 7/8] musb: set 'extvbus = 0' for Davinci boards Ajay Kumar Gupta
[not found] ` <1258470596-24321-8-git-send-email-ajay.gupta-l0cyMroinI0@public.gmane.org>
2009-11-17 15:09 ` [PATCH 8/8] musb: set 'extvbus = 0' for Blackfin boards Ajay Kumar Gupta
[not found] ` <1258470596-24321-9-git-send-email-ajay.gupta-l0cyMroinI0@public.gmane.org>
2009-11-17 16:13 ` Sergei Shtylyov
2009-11-17 16:01 ` [PATCH 7/8] musb: set 'extvbus = 0' for Davinci boards Sergei Shtylyov
2009-11-17 16:01 ` [PATCH 6/8] musb: set 'extvbus = 0' for OMAP3 boards Sergei Shtylyov
2009-11-17 15:53 ` [PATCH 4/8] musb: Update setup_usb() call for all Davinci boards Sergei Shtylyov
[not found] ` <4B02C6FF.6050806-hkdhdckH98+B+jHODAdFcQ@public.gmane.org>
2009-11-18 4:09 ` Gupta, Ajay Kumar
[not found] ` <1258470596-24321-5-git-send-email-ajay.gupta-l0cyMroinI0@public.gmane.org>
2009-11-17 16:03 ` Sergei Shtylyov
2009-11-17 16:10 ` Sergei Shtylyov
[not found] ` <1258470596-24321-4-git-send-email-ajay.gupta-l0cyMroinI0@public.gmane.org>
2009-11-17 16:30 ` [PATCH 3/8] musb: Update musb_init() call for all OMAP3 boards Sergei Shtylyov
[not found] ` <4B02CFC1.3090601-hkdhdckH98+B+jHODAdFcQ@public.gmane.org>
2009-11-18 4:04 ` Gupta, Ajay Kumar
[not found] ` <1258470596-24321-3-git-send-email-ajay.gupta-l0cyMroinI0@public.gmane.org>
2009-11-17 15:42 ` Sergei Shtylyov [this message]
[not found] ` <4B02C45C.4060407-hkdhdckH98+B+jHODAdFcQ@public.gmane.org>
2009-11-18 4:12 ` [PATCH 2/8] musb: Get power (mA) from board data Gupta, Ajay Kumar
[not found] ` <1258470596-24321-2-git-send-email-ajay.gupta-l0cyMroinI0@public.gmane.org>
2009-11-17 15:35 ` [PATCH 1/8] musb: Add structure to get board specific data Sergei Shtylyov
2009-11-17 15:56 ` Sergei Shtylyov
[not found] ` <1258470596-24321-1-git-send-email-ajay.gupta-l0cyMroinI0@public.gmane.org>
2009-11-18 14:20 ` [PATCH 0/8] musb: Add structure 'musb_hdrc_board_data' Sergei Shtylyov
[not found] ` <4B040293.1020501-hkdhdckH98+B+jHODAdFcQ@public.gmane.org>
2009-11-19 5:51 ` Gupta, Ajay Kumar
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=4B02C45C.4060407@ru.mvista.com \
--to=sshtylyov-hkdhdckh98+b+jhodadfcq@public.gmane.org \
--cc=ajay.gupta-l0cyMroinI0@public.gmane.org \
--cc=cooloney-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
--cc=davinci-linux-open-source-VycZQUHpC/PFrsHnngEfi1aTQe2KTcn/@public.gmane.org \
--cc=felipe.balbi-xNZwKgViW5gAvxtiuMwx3w@public.gmane.org \
--cc=gadiyar-l0cyMroinI0@public.gmane.org \
--cc=linux-omap-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-usb-u79uwXL29TY76Z2rM5mHXA@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