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] [day] [month] [year] [list]
Date:	Thu, 17 Sep 2015 19:05:32 +0200
From:	Robert Jarzmik <robert.jarzmik@...e.fr>
To:	Ulf Hansson <ulf.hansson@...aro.org>
Cc:	linux-mmc <linux-mmc@...r.kernel.org>,
	"linux-kernel\@vger.kernel.org" <linux-kernel@...r.kernel.org>,
	Petr Cvek <petr.cvek@....cz>
Subject: Re: [PATCH v2] mmc: pxamci: fix card detect with slot-gpio API

Ulf Hansson <ulf.hansson@...aro.org> writes:

>> +       if (gpio_is_valid(gpio_ro))
>> +               ret = mmc_gpio_request_ro(mmc, gpio_ro);
>
> Would it be possible for you to use the mmc_gpiod_request_ro() instead?
I don't think so.
Most of pxamci users are old platform data based machine code, which passes an
integer for the gpio. A full conversion to gpio_desc is another work.

>> -               gpio_direction_input(gpio_cd);
>>
>> -               ret = request_irq(gpio_to_irq(gpio_cd), pxamci_detect_irq,
>
> I guess the pxamci_detect_irq() function can be removed within this
> patch as well!?
Euh no. The reason is on this line :
		host->pdata->init(&pdev->dev, pxamci_detect_irq, mmc);
Machine code is passed this callback to signal a card detection change for
esoteric cases, using this function as a IRQ handler. For example we have
trizeps4_mci_init() in arch/arm/mach-pxa/trizeps4.c.

>> +       if (gpio_is_valid(gpio_cd))
>> +               ret = mmc_gpio_request_cd(mmc, gpio_cd, 0);
>
> Would it be possible for you to use the mmc_gpiod_request_cd() instead?
Same reason as before I'm afraid.

> I believe you have some additional code to remove in pxamci_remove().
> Some gpio_free() and free_irq() shouldn't be needed there after this
> change.
Yes, good catch. This will be for v3.

Cheers.

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