From: Tom Rini <trini@konsulko.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] dm: usb: Make usb_lowlevel_init set the default ops pointer
Date: Fri, 17 Apr 2015 18:43:39 -0400 [thread overview]
Message-ID: <20150417224339.GO16702@bill-the-cat> (raw)
In-Reply-To: <CAPnjgZ2ayJYJsC6DJHwAdqWwqTgcnH9LnLBzeX-H6nSBeCJcxA@mail.gmail.com>
On Fri, Apr 17, 2015 at 04:38:19PM -0600, Simon Glass wrote:
> Hi Tom.
>
> On 17 April 2015 at 16:02, Tom Rini <trini@konsulko.com> wrote:
> > On Fri, Apr 17, 2015 at 03:28:30PM -0600, Simon Glass wrote:
> >> Hi Tom,
> >>
> >> On 17 April 2015 at 14:31, Tom Rini <trini@konsulko.com> wrote:
> >> > In order to switch to a set of function pointers for certain operations
> >> > we need to ensure that the defaults are first set so that they can be
> >> > overriden as needed by SoC/board specific code.
> >> >
> >> > Signed-off-by: Tom Rini <trini@konsulko.com>
> >> > ---
> >> > drivers/usb/host/ehci-hcd.c | 10 +++++++---
> >> > 1 file changed, 7 insertions(+), 3 deletions(-)
> >> >
> >> > diff --git a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c
> >> > index 79cf3b3..e7c438c 100644
> >> > --- a/drivers/usb/host/ehci-hcd.c
> >> > +++ b/drivers/usb/host/ehci-hcd.c
> >> > @@ -945,9 +945,7 @@ const struct ehci_ops default_ehci_ops = {
> >> >
> >> > static void ehci_setup_ops(struct ehci_ctrl *ctrl, const struct ehci_ops *ops)
> >> > {
> >> > - if (!ops) {
> >> > - ctrl->ops = default_ehci_ops;
> >> > - } else {
> >>
> >> Do we need to remove this? I think this will break when driver model
> >> is used, if NULL is passed in to select the default ops.
> >
> > Nope, just cleaning up the code as-is.
>
> I'm missing something though. For ehci_register() it calls this will
> ops possibly equal to NULL, expecting it to set up the ops.
OK, I missed a case too then, drop this hunk when you squash it in :)
--
Tom
next prev parent reply other threads:[~2015-04-17 22:43 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-17 3:15 [U-Boot] Please pull u-boot-dm.git [take 2] Simon Glass
2015-04-17 16:27 ` Tom Rini
2015-04-17 16:30 ` Simon Glass
2015-04-17 16:46 ` Tom Rini
2015-04-17 16:54 ` Simon Glass
2015-04-17 17:36 ` Hans de Goede
2015-04-17 17:53 ` Tom Rini
2015-04-17 19:28 ` Hans de Goede
2015-04-17 19:39 ` Hans de Goede
2015-04-17 20:41 ` Tom Rini
2015-04-17 21:13 ` Tom Rini
2015-04-17 21:18 ` Simon Glass
2015-04-18 9:19 ` Hans de Goede
2015-04-18 10:31 ` Hans de Goede
2015-04-18 11:10 ` Tom Rini
2015-04-18 12:07 ` Tom Rini
2015-04-18 15:26 ` Simon Glass
2015-04-18 15:51 ` Tom Rini
2015-04-18 20:43 ` Simon Glass
2015-04-17 19:51 ` Tom Rini
2015-04-17 20:31 ` [U-Boot] [PATCH] dm: usb: Make usb_lowlevel_init set the default ops pointer Tom Rini
2015-04-17 21:28 ` Simon Glass
2015-04-17 22:02 ` Tom Rini
2015-04-17 22:38 ` Simon Glass
2015-04-17 22:43 ` Tom Rini [this message]
2015-04-17 22:45 ` Simon Glass
2015-04-17 23:07 ` Tom Rini
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=20150417224339.GO16702@bill-the-cat \
--to=trini@konsulko.com \
--cc=u-boot@lists.denx.de \
/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