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: <53C64AC8.3000709@gmail.com>
Date:	Wed, 16 Jul 2014 15:20:00 +0530
From:	Varka Bhadram <varkabhadram@...il.com>
To:	Antoine Ténart 
	<antoine.tenart@...e-electrons.com>
CC:	sebastian.hesselbarth@...il.com, Peter.Chen@...escale.com,
	balbi@...com, p.zabel@...gutronix.de,
	alexandre.belloni@...e-electrons.com,
	thomas.petazzoni@...e-electrons.com, zmxu@...vell.com,
	jszhang@...vell.com, linux-arm-kernel@...ts.infradead.org,
	linux-usb@...r.kernel.org, devicetree@...r.kernel.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH v3 05/12] phy: add the Berlin USB PHY driver

On 07/16/2014 03:17 PM, Antoine Ténart wrote:
> On Wed, Jul 16, 2014 at 03:03:14PM +0530, Varka Bhadram wrote:
>> On 07/16/2014 02:55 PM, Antoine Ténart wrote:
>>> Hi Varka,
>>>
>>> On Wed, Jul 16, 2014 at 02:49:05PM +0530, Varka Bhadram wrote:
>>>> On 07/16/2014 01:55 PM, Antoine Ténart wrote:
>>>>> +static const struct of_device_id phy_berlin_sata_of_match[] = {
>>>>> +	{
>>>>> +		.compatible = "marvell,berlin2-usb-phy",
>>>>> +		.data = &phy_berlin_pll_dividers[0],
>>>>> +	},
>>>>> +	{
>>>>> +		.compatible = "marvell,berlin2cd-usb-phy",
>>>>> +		.data = &phy_berlin_pll_dividers[1],
>>>>> +	},
>>>>> +	{ },
>>>>> +};
>>>>> +MODULE_DEVICE_TABLE(of, phy_berlin_sata_of_match);
>>>>> +
>>>> It looks good if we move this after probe().. So that we can see of_match_table directly...
>>> We use the of match table in the probe, when calling of_match_device().
>>>
>>>>> +static int phy_berlin_usb_probe(struct platform_device *pdev)
>>>>> +{
>>>>> +	const struct of_device_id *match =
>>>>> +		of_match_device(phy_berlin_sata_of_match, &pdev->dev);
>> We are updating of_match_table in platform_driver struct.
> Yes. This is not the same thing. of_match_device() allows to get a
> pointer to the of_device_id that matched, to retrieve its data.
>
>> Every driver follows the concept of giving the of_device_ids
>> above the platform_driver declaration...
> Lots of drivers using of_match_device() declare their of_device_id
> structure before the probe.
>
Yes . I also checked that. Thanks  :-)

-- 
Regards,
Varka Bhadram.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ