]> git.baikalelectronics.ru Git - kernel.git/commit
sysfs: Wrap __compat_only_sysfs_link_entry_to_kobj function to change the symlink...
authorSourabh Jain <sourabhjain@linux.ibm.com>
Wed, 11 Dec 2019 16:09:06 +0000 (21:39 +0530)
committerMichael Ellerman <mpe@ellerman.id.au>
Wed, 19 Feb 2020 10:07:09 +0000 (21:07 +1100)
commit71d799ee799fa4260a59694d21d641a1d387b10b
treee170801c0010faf3b1fed320fedcf7c52d01b25f
parent761b9bf086df6d48ac4f73b6277b087da3c0d8bc
sysfs: Wrap __compat_only_sysfs_link_entry_to_kobj function to change the symlink name

The __compat_only_sysfs_link_entry_to_kobj function creates a symlink
to a kobject but doesn't provide an option to change the symlink file
name.

This patch adds a wrapper function compat_only_sysfs_link_entry_to_kobj
that extends the __compat_only_sysfs_link_entry_to_kobj functionality
which allows function caller to customize the symlink name.

Signed-off-by: Sourabh Jain <sourabhjain@linux.ibm.com>
[mpe: Fix compile error when CONFIG_SYSFS=n]
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20191211160910.21656-3-sourabhjain@linux.ibm.com
fs/sysfs/group.c
include/linux/sysfs.h