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:	Thu, 04 Aug 2016 18:10:37 +0200
From:	Alexander Stein <alexander.stein@...tec-electronic.com>
To:	linux-kernel@...r.kernel.org
Cc:	Ksenija Stanojevic <ksenija.stanojevic@...il.com>,
	lee.jones@...aro.org, dmitry.torokhov@...il.com,
	linux-input@...r.kernel.org, jic23@...nel.org, knaack.h@....de,
	lars@...afoo.de, pmeerw@...erw.net, marex@...x.de,
	linux-iio@...r.kernel.org, harald@...ib.org,
	stefan.wahren@...e.com, fabio.estevam@...escale.com
Subject: Re: [PATCH v4 1/4] mfd: mxs-lradc: Add support for mxs-lradc MFD

On Thursday 04 August 2016 15:28:18, Ksenija Stanojevic wrote:
> Add core files for mxs-lradc MFD driver.
> 
> Note:  this patch won't compile in iio/testing without this patch:
> a8f447be8056 ("mfd: Add resource managed APIs for mfd_add_devices")
> 
> Signed-off-by: Ksenija Stanojevic <ksenija.stanojevic@...il.com>
> ---
> [...]
> +static int mxs_lradc_probe(struct platform_device *pdev)
> +{
> +	const struct of_device_id *of_id;
> +	struct device *dev = &pdev->dev;
> +	struct device_node *node = dev->of_node;
> +	struct mxs_lradc *lradc;
> +	struct resource *iores;
> +	struct mfd_cell *cells = NULL;
> +	int ret = 0;
> +	u32 ts_wires = 0;
> +
> +	lradc = devm_kzalloc(&pdev->dev, sizeof(*lradc), GFP_KERNEL);
> +	if (!lradc)
> +		return -ENOMEM;
> +
> +	of_id = of_match_device(mxs_lradc_dt_ids, &pdev->dev);
> +	lradc->soc = (enum mxs_lradc_id)of_id->data;
> +
> +	iores = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> +	lradc->base = devm_ioremap_resource(dev, iores);

Out of couriosity: Is it common to pass already ioremapped addresses to (MFD 
cell) platform drivers? I would have expected, and done myself, that ioremap 
is done in the driver itself, same as the IRQ.

Best regards,
Alexander

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ