[linux-yocto] [PATCH] gpio-pca953x: fix the "drive" property cannot read/write
Bruce Ashfield
bruce.ashfield at windriver.com
Fri Apr 1 17:19:43 PDT 2016
On 2016-04-01 7:30 PM, Yong Li wrote:
> Hi Bruce, sorry I did not describe this information. Yes, you are
> correct, this patch is targeted for linux-yocto-4.4, standard/base
> branch.
Thanks for the confirmation. I have this staged now.
Bruce
>
> Thanks,
> Yong
>
> 2016-04-02 3:40 GMT+08:00 Bruce Ashfield <bruce.ashfield at windriver.com>:
>> On 2016-04-01 11:12 AM, Yong Li wrote:
>>>
>>> The gpio_drive_show/store use incorrect gpio_desc,
>>> this causes the drive sysfs property cannot be used,
>>> This patch fixes this issue
>>
>>
>> This is destined for linux-yocto_4.4, correct ?
>>
>> Bruce
>>
>>>
>>> Upstream-status: Inappropriate, custom code for legacy userspace
>>>
>>> Signed-off-by: Yong Li <yong.b.li at intel.com>
>>> ---
>>> drivers/gpio/gpiolib-sysfs.c | 6 ++++--
>>> 1 file changed, 4 insertions(+), 2 deletions(-)
>>>
>>> diff --git a/drivers/gpio/gpiolib-sysfs.c b/drivers/gpio/gpiolib-sysfs.c
>>> index b60e477..6c6127d 100644
>>> --- a/drivers/gpio/gpiolib-sysfs.c
>>> +++ b/drivers/gpio/gpiolib-sysfs.c
>>> @@ -355,7 +355,8 @@ static DEVICE_ATTR_RW(active_low);
>>> static ssize_t gpio_drive_show(struct device *dev,
>>> struct device_attribute *attr, char *buf)
>>> {
>>> - const struct gpio_desc *desc = dev_get_drvdata(dev);
>>> + struct gpiod_data *data = dev_get_drvdata(dev);
>>> + struct gpio_desc *desc = data->desc;
>>> ssize_t status;
>>>
>>> mutex_lock(&sysfs_lock);
>>> @@ -382,7 +383,8 @@ static ssize_t gpio_drive_show(struct device *dev,
>>> static ssize_t gpio_drive_store(struct device *dev,
>>> struct device_attribute *attr, const char *buf, size_t
>>> size)
>>> {
>>> - struct gpio_desc *desc = dev_get_drvdata(dev);
>>> + struct gpiod_data *data = dev_get_drvdata(dev);
>>> + struct gpio_desc *desc = data->desc;
>>> ssize_t status;
>>>
>>> mutex_lock(&sysfs_lock);
>>>
>>
>> --
>> _______________________________________________
>> linux-yocto mailing list
>> linux-yocto at yoctoproject.org
>> https://lists.yoctoproject.org/listinfo/linux-yocto
More information about the linux-yocto
mailing list