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]
Message-ID: <574D26C2.1090502@nvidia.com>
Date:	Tue, 31 May 2016 11:23:06 +0530
From:	Laxman Dewangan <ldewangan@...dia.com>
To:	Linus Walleij <linus.walleij@...aro.org>
CC:	Alexandre Courbot <gnurou@...il.com>,
	"linux-gpio@...r.kernel.org" <linux-gpio@...r.kernel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 2/3] gpio: max77620: Implement gpio_get_direction callback


On Monday 30 May 2016 08:33 PM, Linus Walleij wrote:
> On Tue, May 24, 2016 at 3:13 PM, Laxman Dewangan <ldewangan@...dia.com> wrote:
>
>> Implement gpio_get_direction() callback for MAX77620 GPIO.
>> This is useful for debugfs and the userspace ABI.
>>
>> Signed-off-by: Laxman Dewangan <ldewangan@...dia.com>
>>   #include <linux/gpio/driver.h>
>> +#include <linux/gpio.h>
> No. This is a sign that something is wrong, no driver should include
> this unless it is using GPIOs as a resource itself.
This is just to use the flag GPIOF_*

As you said below, we can use the 0 and 1, there is no need to include 
header.
Will post the v2 patch for this.


>> +       return (val & MAX77620_CNFG_GPIO_DIR_MASK) ?
>> +               GPIOF_DIR_IN : GPIOF_DIR_OUT;
> Just return 0 or 1. The driver-internal API isn't smarter than that.
>



Thanks,
Laxman

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ