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]
Date:	Fri, 25 Jul 2014 14:09:23 +0800
From:	Nicolin Chen <Guangyu.Chen@...escale.com>
To:	Varka Bhadram <varkabhadram@...il.com>
CC:	Nicolin Chen <nicoleotsuka@...il.com>, <broonie@...nel.org>,
	<robh+dt@...nel.org>, <pawel.moll@....com>, <mark.rutland@....com>,
	<ijc+devicetree@...lion.org.uk>, <galak@...eaurora.org>,
	<rdunlap@...radead.org>, <lgirdwood@...il.com>, <perex@...ex.cz>,
	<tiwai@...e.de>, <timur@...i.org>, <grant.likely@...aro.org>,
	<devicetree@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
	<alsa-devel@...a-project.org>, <linuxppc-dev@...ts.ozlabs.org>,
	<shawn.guo@...aro.org>, <b02247@...escale.com>,
	<b42378@...escale.com>, <tklauser@...tanz.ch>
Subject: Re: [PATCH v3 2/2] ASoC: fsl_asrc: Add ASRC ASoC CPU DAI and
 platform drivers

On Fri, Jul 25, 2014 at 11:47:42AM +0530, Varka Bhadram wrote:
> Hi Nicolin,
> 
> On 07/25/2014 11:24 AM, Nicolin Chen wrote:
> >Hi Varka,
> >
> >    Regarding a point you suggested.
> >
> >On Fri, Jul 25, 2014 at 09:54:43AM +0530, Varka Bhadram wrote:
> >>On 07/25/2014 09:33 AM, Nicolin Chen wrote:
> >>(...)
> >>
> >>>+
> >>>+static const struct platform_device_id fsl_asrc_devtype[] = {
> >>>+	{
> >>>+		.name = "imx35-asrc",
> >>>+		.driver_data = IMX35_ASRC,
> >>>+	}, {
> >>>+		.name = "imx53-asrc",
> >>>+		.driver_data = IMX53_ASRC,
> >>>+	}, {
> >>>+		/* sentinel */
> >>>+	}
> >>>+};
> >>>+MODULE_DEVICE_TABLE(platform, fsl_asrc_devtype);
> >>>+
> >>>+static const struct of_device_id fsl_asrc_ids[] = {
> >>>+	{
> >>>+		.compatible = "fsl,imx35-asrc",
> >>>+		.data = &fsl_asrc_devtype[IMX35_ASRC],
> >>>+	}, {
> >>>+		.compatible = "fsl,imx53-asrc",
> >>>+		.data = &fsl_asrc_devtype[IMX53_ASRC],
> >>>+	}, {
> >>>+		/* sentinel */
> >>>+	}
> >>>+};
> >>>+MODULE_DEVICE_TABLE(of, fsl_asrc_ids);
> >>>+
> >>move these ids after probe/remove... every driver follows same thing...
> >Hmm.. fsl_asrc_ids is called in probe(), so it's probably not a good choice
> >to put them after probe/remove. And actually not every driver does so.
> >For example drivers/i2c/busses/i2c-s3c2410.c
> >
> >I think it should be okay to put here if it contains data.
> 
> You are using these ids in the probe .Tt should be above the probe() so
> we can see of_match_device() directly...
> and also one more thing that the interrupt handler also would be immediately
> above the probe()
> 
> ex:
> static irqreturn_t fsl_asrc_isr(int irq, void *dev_id)
> {
> ...
> }
> 
> device ids..
> 
> your_probe()
> {
> ...
> }
> 
> your_remove()
> {
> ...
> }
> 
> Now every driver that is coming following this style...

I see....

Will follow this style.

Thank you!
Nicolin

---
> 
> If your not using device ids in probe then it would be like
> 
> static irqreturn_t fsl_asrc_isr(int irq, void *dev_id)
> {
> ...
> }
> 
> your_probe()
> {
> ...
> }
> 
> your_remove()
> {
> ...
> }
> 
> device ids..
> 
> 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