From mboxrd@z Thu Jan 1 00:00:00 1970 From: arnd@arndb.de (Arnd Bergmann) Date: Thu, 21 May 2015 11:39:34 +0200 Subject: [PATCH] extcon: fix phy-tahvo driver for extcon API change Message-ID: <4940971.fmN098LqHi@wuerfel> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org Today, the API for the extcon drivers was changed, along with all drivers in drivers/extcon. However, one extcon driver instead lives in drivers/usb/phy/ and did not get change. Gcc warns about the now incorrect API usage: drivers/usb/phy/phy-tahvo.c: In function 'tahvo_usb_probe': drivers/usb/phy/phy-tahvo.c:368:29: warning: assignment from incompatible pointer type [-Wincompatible-pointer-types] tu->extcon.supported_cable = tahvo_cable; This changes the API in the same way as the other drivers. Signed-off-by: Arnd Bergmann Fixes: 17cd440c9acc ("extcon: Update the prototype of extcon_register_notifier() with enum extcon") --- As the API change is only present in the extcon tree, this patch should get merged there as well, not in the usb-phy tree. If possible, please fold into the original commit. diff --git a/drivers/usb/phy/phy-tahvo.c b/drivers/usb/phy/phy-tahvo.c index 845f658276b1..1d1bb9ad8ccf 100644 --- a/drivers/usb/phy/phy-tahvo.c +++ b/drivers/usb/phy/phy-tahvo.c @@ -60,10 +60,11 @@ struct tahvo_usb { struct extcon_dev extcon; }; -static const char *tahvo_cable[] = { - "USB-HOST", - "USB", - NULL, +static const enum extcon tahvo_cable[] = { + EXTCON_USB, + EXTCON_USB_HOST, + + EXTCON_NONE, }; static ssize_t vbus_state_show(struct device *device, From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754541AbbEUJkK (ORCPT ); Thu, 21 May 2015 05:40:10 -0400 Received: from mout.kundenserver.de ([212.227.126.130]:61927 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752331AbbEUJkH (ORCPT ); Thu, 21 May 2015 05:40:07 -0400 From: Arnd Bergmann To: Chanwoo Choi Cc: Felipe Balbi , Greg Kroah-Hartman , linux-usb@vger.kernel.org, MyungJoo Ham , Chanwoo Choi , Krzysztof Kozlowski , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH] extcon: fix phy-tahvo driver for extcon API change Date: Thu, 21 May 2015 11:39:34 +0200 Message-ID: <4940971.fmN098LqHi@wuerfel> User-Agent: KMail/4.11.5 (Linux/3.16.0-10-generic; KDE/4.11.5; x86_64; ; ) MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Provags-ID: V03:K0:BS+ZmcPbaKHVFhkeB1wiPaamAz1Vkpczciej8p/yyydgHstQefk 9lgR/cIK9Yu2Rc63LYOrRPceEp/1JS6e3blf6A2ewJeD5wvzaY4ewHFfLLQNRGYMpqgoPbu WKhADMXjuhSAxIOTMRsnt3ew0wjwV+jyVgkctVbniTFeebYVTng0cEyTWY9LYXqMGEp1dS4 1OcvxDqBb7PSr74f9tjHQ== X-UI-Out-Filterresults: notjunk:1; Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Today, the API for the extcon drivers was changed, along with all drivers in drivers/extcon. However, one extcon driver instead lives in drivers/usb/phy/ and did not get change. Gcc warns about the now incorrect API usage: drivers/usb/phy/phy-tahvo.c: In function 'tahvo_usb_probe': drivers/usb/phy/phy-tahvo.c:368:29: warning: assignment from incompatible pointer type [-Wincompatible-pointer-types] tu->extcon.supported_cable = tahvo_cable; This changes the API in the same way as the other drivers. Signed-off-by: Arnd Bergmann Fixes: 17cd440c9acc ("extcon: Update the prototype of extcon_register_notifier() with enum extcon") --- As the API change is only present in the extcon tree, this patch should get merged there as well, not in the usb-phy tree. If possible, please fold into the original commit. diff --git a/drivers/usb/phy/phy-tahvo.c b/drivers/usb/phy/phy-tahvo.c index 845f658276b1..1d1bb9ad8ccf 100644 --- a/drivers/usb/phy/phy-tahvo.c +++ b/drivers/usb/phy/phy-tahvo.c @@ -60,10 +60,11 @@ struct tahvo_usb { struct extcon_dev extcon; }; -static const char *tahvo_cable[] = { - "USB-HOST", - "USB", - NULL, +static const enum extcon tahvo_cable[] = { + EXTCON_USB, + EXTCON_USB_HOST, + + EXTCON_NONE, }; static ssize_t vbus_state_show(struct device *device,