[lkml]   [2020]   [Mar]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Patch in this message
Subjectlinux-next: build failure after merge of the usb tree
Hi all,

After merging the usb tree, today's linux-next build (arm
multi_v7_defconfig) failed like this:

drivers/phy/tegra/xusb.c: In function 'tegra_xusb_setup_usb_role_switch':
drivers/phy/tegra/xusb.c:641:10: error: initialization of 'int (*)(struct usb_role_switch *, enum usb_role)' from incompatible pointer type 'int (*)(struct device *, enum usb_role)' [-Werror=incompatible-pointer-types]
641 | .set = tegra_xusb_role_sw_set,
| ^~~~~~~~~~~~~~~~~~~~~~
drivers/phy/tegra/xusb.c:641:10: note: (near initialization for 'role_sx_desc.set')

Caused by commit

bce3052f0c16 ("usb: roles: Provide the switch drivers handle to the switch in the API")

interacting with commit

5a00c7c7604f ("phy: tegra: xusb: Add usb-role-switch support")

from the tegra tree.

I have added this merge fix patch (which may need more work):

From: Stephen Rothwell <>
Date: Mon, 16 Mar 2020 14:04:20 +1100
Subject: [PATCH] phy: tegra: fix up for set_role API change

Signed-off-by: Stephen Rothwell <>
drivers/phy/tegra/xusb.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/drivers/phy/tegra/xusb.c b/drivers/phy/tegra/xusb.c
index d907f03bf282..25223c350e66 100644
--- a/drivers/phy/tegra/xusb.c
+++ b/drivers/phy/tegra/xusb.c
@@ -596,11 +596,12 @@ static void tegra_xusb_usb_phy_work(struct work_struct *work)
atomic_notifier_call_chain(&port->usb_phy.notifier, 0, &port->usb_phy);

-static int tegra_xusb_role_sw_set(struct device *dev, enum usb_role role)
+static int tegra_xusb_role_sw_set(struct usb_role_switch *sw,
+ enum usb_role role)
- struct tegra_xusb_port *port = dev_get_drvdata(dev);
+ struct tegra_xusb_port *port = usb_role_switch_get_drvdata(sw);

- dev_dbg(dev, "%s(): role %s\n", __func__, usb_roles[role]);
+ dev_dbg(&port->dev, "%s(): role %s\n", __func__, usb_roles[role]);


Stephen Rothwell
[unhandled content-type:application/pgp-signature]
 \ /
  Last update: 2020-03-16 04:11    [W:0.089 / U:3.200 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site