usb: musb: core: fix order of arguments to ulpi write callback
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Fri, 23 Oct 2015 07:53:50 +0000 (09:53 +0200)
committerBen Hutchings <ben@decadent.org.uk>
Wed, 30 Dec 2015 02:25:55 +0000 (02:25 +0000)
commitfff91a21b73be03e2ee85765d5599c9450b22ed7
tree3f7a650cca2684c8fe3191d3fd24525057c46859
parent3d0e1f04e06c64bdd8e77d28156d8a23e450c706
usb: musb: core: fix order of arguments to ulpi write callback

commit 705e63d2b29c8bbf091119084544d353bda70393 upstream.

There is a bit of a mess in the order of arguments to the ulpi write
callback. There is

int ulpi_write(struct ulpi *ulpi, u8 addr, u8 val)

in drivers/usb/common/ulpi.c;

struct usb_phy_io_ops {
...
int (*write)(struct usb_phy *x, u32 val, u32 reg);
}

in include/linux/usb/phy.h.

The callback registered by the musb driver has to comply to the latter,
but up to now had "offset" first which effectively made the function
broken for correct users. So flip the order and while at it also
switch to the parameter names of struct usb_phy_io_ops's write.

Fixes: ffb865b1e460 ("usb: musb: add ulpi access operations")
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Felipe Balbi <balbi@ti.com>
[bwh: Backported to 3.2: adjust context]
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
drivers/usb/musb/musb_core.c