Re: Accessing rpmsg_device in sysfs attribute functions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Mar 24, 2020 at 10:49:46AM +0100, Martin Kaiser wrote:
> Hi Greg,
> 
> Thus wrote Greg KH (greg@xxxxxxxxx):
> 
> > That is because you have created a driver attribute, not a device
> > attribute.  Create device attributes and you should be fine, they bind
> > to the device your driver is passed.
> 
> could you point me to an example in the kernel tree where this is done
> correctly for a platform device?
> 
> I had a look at
> 
> http://kroah.com/log/blog/2013/06/26/how-to-create-a-sysfs-file-correctly/
> 
> but I couldn't figure out how to create device attributes in a simple
> platform driver that binds to a platform device.

Look at commit d99995a4f0f1 ("Input: axp20x-pek - convert driver to use
dev_groups") in the 5.4 kernel as an example of how to use the correct
api here.

Hope this helps,

greg k-h

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@xxxxxxxxxxxxxxxxx
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies



[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]

  Powered by Linux