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:	Tue, 13 May 2008 13:27:24 +0400
From:	Sergei Shtylyov <sshtylyov@...mvista.com>
To:	Manuel Lauss <mano@...rinelk.homelinux.net>
Cc:	linux-mips@...ux-mips.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 3/7] au1xmmc: remove db1x00 board-specific functions from
 driver

Hello.

Manuel Lauss wrote:
> Remove the DB1200 board-specific functions (card present, read-only
> methods) and instead add platform data which is passed to the driver.
> This allows for platforms to implement other carddetect schemes
> (e.g. dedicated irq) without having to pollute the driver code.
> The poll timer (used for pb1200) is kept for compatibility.
>
> With the board-specific stuff gone, the driver no longer needs to know
> how many physical controllers the silicon actually has; every device
> can be registered as needed, update the code to reflect that.
>
> Signed-off-by: Manuel Lauss <mano@...rinelk.homelinux.net>
[...]
> diff --git a/drivers/mmc/host/au1xmmc.c b/drivers/mmc/host/au1xmmc.c
> index cc5f7bc..8660f86 100644
> --- a/drivers/mmc/host/au1xmmc.c
> +++ b/drivers/mmc/host/au1xmmc.c
[...]
> +static int __devinit au1xmmc_probe(struct platform_device *pdev)
> +{
> +	struct mmc_host *mmc;
> +	struct au1xmmc_host *host;
> +	struct resource *r;
> +	int ret;
> +
> +	mmc = mmc_alloc_host(sizeof(struct au1xmmc_host), &pdev->dev);
> +	if (!mmc) {
> +		dev_err(&pdev->dev, "no memory for mmc host\n");
> +		ret = -ENOMEM;
> +		goto out0;
> +	}
>  
> -		if (!mmc) {
> -			printk(DRIVER_NAME "ERROR: no mem for host %d\n", i);
> -			au1xmmc_hosts[i] = 0;
> -			continue;
> -		}
> +	host = mmc_priv(mmc);
> +	host->mmc = mmc;
> +	host->platdata = pdev->dev.platform_data;
> +	host->pdev = pdev;
>  
> -		mmc->ops = &au1xmmc_ops;
> +	ret = -ENODEV;
> +	r = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> +	if (!r) {
> +		dev_err(&pdev->dev, "no mmio defined\n");
> +		goto out1;
> +	}
>   

   I forgot to mention that the driver should be calling 
request_mem_region() here...

WBR, Sergei


--
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