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 PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Tue, 02 Nov 2021 15:34:20 +0100 From: Philipp Zabel <p.zabel@...gutronix.de> To: "LH.Kuo" <lhjeff911@...il.com>, ulf.hansson@...aro.org, robh+dt@...nel.org, linux-kernel@...r.kernel.org, linux-mmc@...r.kernel.org, devicetree@...r.kernel.org Cc: dvorkin@...bo.com, qinjian@...lus1.com, wells.lu@...plus.com, "LH.Kuo" <lh.kuo@...plus.com> Subject: Re: [PATCH 1/2] mmc: Add SD/SDIO driver for Sunplus SP7021 On Fri, 2021-10-29 at 13:57 +0800, LH.Kuo wrote: [...] > --- /dev/null > +++ b/drivers/mmc/host/sunplus_sd2.c > @@ -0,0 +1,1069 @@ [...] > +static void spsdc_controller_init(struct spsdc_host *host) > +{ > + u32 value; > + int ret = reset_control_assert(host->rstc); > + > + if (!ret) { > + mdelay(1); Consider using usleep_range(), see Documentation/timers/timers-howto.rst [...] > +static int spsdc_drv_probe(struct platform_device *pdev) > +{ > + int ret = 0; > + struct mmc_host *mmc; > + struct resource *resource; > + struct spsdc_host *host; > + unsigned int mode; > + > + mmc = mmc_alloc_host(sizeof(*host), &pdev->dev); > + if (!mmc) { > + ret = -ENOMEM; > + goto probe_free_host; > + } > + > + host = mmc_priv(mmc); > + host->mmc = mmc; > + host->power_state = MMC_POWER_OFF; > + host->dma_int_threshold = 1024; > + host->dmapio_mode = SPSDC_DMA_MODE; > + > + host->clk = devm_clk_get(&pdev->dev, NULL); > + if (IS_ERR(host->clk)) { > + spsdc_pr(ERROR, "Can not find clock source\n"); > + ret = PTR_ERR(host->clk); > + goto probe_free_host; > + } > + > + host->rstc = devm_reset_control_get(&pdev->dev, NULL); Please use devm_reset_control_get_exclusive() instead. regards Philipp
Powered by blists - more mailing lists