lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 13 Apr 2017 17:17:47 +0530
From:   Kishon Vijay Abraham I <kishon@...com>
To:     Chanwoo Choi <cw00.choi@...sung.com>
CC:     <linux-arm-kernel@...ts.infradead.org>,
        <linux-kernel@...r.kernel.org>, <chanwoo@...nel.org>,
        Heiko Stuebner <heiko@...ech.de>,
        <linux-rockchip@...ts.infradead.org>
Subject: Re: [PATCH 2/2] phy: rockchip-inno-usb2: Replace the extcon API



On Tuesday 28 March 2017 10:08 AM, Chanwoo Choi wrote:
> This patch uses the resource-managed extcon API for extcon_register_notifier()
> and replaces the deprecated extcon API as following:
> - extcon_get_cable_state_() -> extcon_get_state()
> - extcon_set_cable_state_() -> extcon_set_state_sync()
> 
> Cc: Kishon Vijay Abraham I <kishon@...com>
> Cc: Heiko Stuebner <heiko@...ech.de>
> Cc: linux-rockchip@...ts.infradead.org
> Signed-off-by: Chanwoo Choi <cw00.choi@...sung.com>

for this too:
Acked-by: Kishon Vijay Abraham I <kishon@...com>
> ---
>  drivers/phy/phy-rockchip-inno-usb2.c | 10 +++++-----
>  1 file changed, 5 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/phy/phy-rockchip-inno-usb2.c b/drivers/phy/phy-rockchip-inno-usb2.c
> index 4ea95c28a66f..02751f70067e 100644
> --- a/drivers/phy/phy-rockchip-inno-usb2.c
> +++ b/drivers/phy/phy-rockchip-inno-usb2.c
> @@ -540,7 +540,7 @@ static void rockchip_usb2phy_otg_sm_work(struct work_struct *work)
>  			rockchip_usb2phy_power_off(rport->phy);
>  		/* fall through */
>  	case OTG_STATE_B_IDLE:
> -		if (extcon_get_cable_state_(rphy->edev, EXTCON_USB_HOST) > 0) {
> +		if (extcon_get_state(rphy->edev, EXTCON_USB_HOST) > 0) {
>  			dev_dbg(&rport->phy->dev, "usb otg host connect\n");
>  			rport->state = OTG_STATE_A_HOST;
>  			rockchip_usb2phy_power_on(rport->phy);
> @@ -596,7 +596,7 @@ static void rockchip_usb2phy_otg_sm_work(struct work_struct *work)
>  			rport->vbus_attached = vbus_attach;
>  
>  			if (notify_charger && rphy->edev) {
> -				extcon_set_cable_state_(rphy->edev,
> +				extcon_set_state_sync(rphy->edev,
>  							cable, vbus_attach);
>  				if (cable == EXTCON_CHG_USB_SDP)
>  					extcon_set_state_sync(rphy->edev,
> @@ -617,7 +617,7 @@ static void rockchip_usb2phy_otg_sm_work(struct work_struct *work)
>  		sch_work = true;
>  		break;
>  	case OTG_STATE_A_HOST:
> -		if (extcon_get_cable_state_(rphy->edev, EXTCON_USB_HOST) == 0) {
> +		if (extcon_get_state(rphy->edev, EXTCON_USB_HOST) == 0) {
>  			dev_dbg(&rport->phy->dev, "usb otg host disconnect\n");
>  			rport->state = OTG_STATE_B_IDLE;
>  			rockchip_usb2phy_power_off(rport->phy);
> @@ -1003,8 +1003,8 @@ static int rockchip_usb2phy_otg_port_init(struct rockchip_usb2phy *rphy,
>  	if (!IS_ERR(rphy->edev)) {
>  		rport->event_nb.notifier_call = rockchip_otg_event;
>  
> -		ret = extcon_register_notifier(rphy->edev, EXTCON_USB_HOST,
> -					       &rport->event_nb);
> +		ret = devm_extcon_register_notifier(rphy->dev, rphy->edev,
> +					EXTCON_USB_HOST, &rport->event_nb);
>  		if (ret)
>  			dev_err(rphy->dev, "register USB HOST notifier failed\n");
>  	}
> 

Powered by blists - more mailing lists