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  linux-cve-announce  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]
Message-ID: <20140718135419.GG24914@saruman.home>
Date:	Fri, 18 Jul 2014 08:54:20 -0500
From:	Felipe Balbi <balbi@...com>
To:	Lothar Waßmann <LW@...O-electronics.de>
CC:	Felipe Balbi <balbi@...com>,
	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	<linux-kernel@...r.kernel.org>, <linux-usb@...r.kernel.org>,
	Ezequiel Garcia <ezequiel@...guardiasur.com.ar>,
	George Cherian <george.cherian@...com>,
	<linux-arm-kernel@...ts.infradead.org>,
	Roger Quadros <rogerq@...com>
Subject: Re: [PATCH 7/9] usb: phy: am335x: setup the gen_phy function
 pointers _before_ adding the phy

On Fri, Jul 18, 2014 at 11:31:28AM +0200, Lothar Waßmann wrote:
> Make sure all parameters are correctly set up before registering the
> PHY with the USB framework.
> 
> Signed-off-by: Lothar Waßmann <LW@...O-electronics.de>
> ---
>  drivers/usb/phy/phy-am335x.c |    5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/usb/phy/phy-am335x.c b/drivers/usb/phy/phy-am335x.c
> index 91c71ab..6522fa7 100644
> --- a/drivers/usb/phy/phy-am335x.c
> +++ b/drivers/usb/phy/phy-am335x.c
> @@ -56,11 +56,12 @@ static int am335x_phy_probe(struct platform_device *pdev)
>  	if (ret)
>  		return ret;
>  
> +	am_phy->usb_phy_gen.phy.init = am335x_init;
> +	am_phy->usb_phy_gen.phy.shutdown = am335x_shutdown;
> +
>  	ret = usb_add_phy_dev(&am_phy->usb_phy_gen.phy);
>  	if (ret)
>  		return ret;
> -	am_phy->usb_phy_gen.phy.init = am335x_init;
> -	am_phy->usb_phy_gen.phy.shutdown = am335x_shutdown;
>  
>  	platform_set_drvdata(pdev, am_phy);
>  	device_init_wakeup(dev, true);

both of these need to be done before registering the PHY too.

-- 
balbi

Download attachment "signature.asc" of type "application/pgp-signature" (820 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ