]> git.baikalelectronics.ru Git - kernel.git/commit
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)
committerFelipe Balbi <balbi@ti.com>
Mon, 16 Nov 2015 16:15:42 +0000 (10:15 -0600)
commit22741e6e1fe29f62b28e5f1dd5ea3a5650f2fd49
tree8388dfc6507ce99215eb3dcad1ee5b6cf231fe8c
parent94f511a4c7dba0a9f7181eac4b87cf8ddf7e8d61
usb: musb: core: fix order of arguments to ulpi write callback

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: 3b14dfcf9df1 ("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>
drivers/usb/musb/musb_core.c