mirror of
https://github.com/tbsdtv/linux_media.git
synced 2025-07-23 04:33:26 +02:00
Merge tag 'driver-core-6.5-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core
Pull driver core updates from Greg KH: "Here are a small set of changes for 6.5-rc1 for some driver core changes. Included in here are: - device property cleanups to make it easier to write "agnostic" drivers when regards to the firmware layer underneath them (DT vs. ACPI) - debugfs documentation updates - devres additions - sysfs documentation and changes to handle empty directory creation logic better - tiny kernfs optimizations - other tiny changes All of these have been in linux-next for a while with no reported problems" * tag 'driver-core-6.5-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: sysfs: Skip empty folders creation sysfs: Improve readability by following the kernel coding style drivers: fwnode: fix fwnode_irq_get[_byname]() ata: ahci_platform: Make code agnostic to OF/ACPI device property: Implement device_is_compatible() ACPI: Move ACPI_DEVICE_CLASS() to mod_devicetable.h base/node: Use 'property' to identify an access parameter driver core: device.h: add some missing kerneldocs kernfs: fix missing kernfs_idr_lock to remove an ID from the IDR isa: Remove unnecessary checks MAINTAINERS: add entry for auxiliary bus debugfs: Correct the 'debugfs_create_str' docs serial: qcom_geni: Comment use of devm_krealloc rather than devm_krealloc_array iio: adc: Use devm_krealloc_array hwmon: pmbus: Use devm_krealloc_array
This commit is contained in:
@@ -940,15 +940,6 @@ static const struct file_operations fops_str_wo = {
|
||||
* This function creates a file in debugfs with the given name that
|
||||
* contains the value of the variable @value. If the @mode variable is so
|
||||
* set, it can be read from, and written to.
|
||||
*
|
||||
* This function will return a pointer to a dentry if it succeeds. This
|
||||
* pointer must be passed to the debugfs_remove() function when the file is
|
||||
* to be removed (no automatic cleanup happens if your module is unloaded,
|
||||
* you are responsible here.) If an error occurs, ERR_PTR(-ERROR) will be
|
||||
* returned.
|
||||
*
|
||||
* If debugfs is not enabled in the kernel, the value ERR_PTR(-ENODEV) will
|
||||
* be returned.
|
||||
*/
|
||||
void debugfs_create_str(const char *name, umode_t mode,
|
||||
struct dentry *parent, char **value)
|
||||
|
@@ -655,7 +655,9 @@ static struct kernfs_node *__kernfs_new_node(struct kernfs_root *root,
|
||||
return kn;
|
||||
|
||||
err_out3:
|
||||
spin_lock(&kernfs_idr_lock);
|
||||
idr_remove(&root->ino_idr, (u32)kernfs_ino(kn));
|
||||
spin_unlock(&kernfs_idr_lock);
|
||||
err_out2:
|
||||
kmem_cache_free(kernfs_node_cache, kn);
|
||||
err_out1:
|
||||
|
@@ -118,11 +118,13 @@ static int internal_create_group(struct kobject *kobj, int update,
|
||||
/* Updates may happen before the object has been instantiated */
|
||||
if (unlikely(update && !kobj->sd))
|
||||
return -EINVAL;
|
||||
|
||||
if (!grp->attrs && !grp->bin_attrs) {
|
||||
WARN(1, "sysfs: (bin_)attrs not set by subsystem for group: %s/%s\n",
|
||||
kobj->name, grp->name ?: "");
|
||||
return -EINVAL;
|
||||
pr_debug("sysfs: (bin_)attrs not set by subsystem for group: %s/%s, skipping\n",
|
||||
kobj->name, grp->name ?: "");
|
||||
return 0;
|
||||
}
|
||||
|
||||
kobject_get_ownership(kobj, &uid, &gid);
|
||||
if (grp->name) {
|
||||
if (update) {
|
||||
@@ -142,8 +144,10 @@ static int internal_create_group(struct kobject *kobj, int update,
|
||||
return PTR_ERR(kn);
|
||||
}
|
||||
}
|
||||
} else
|
||||
} else {
|
||||
kn = kobj->sd;
|
||||
}
|
||||
|
||||
kernfs_get(kn);
|
||||
error = create_files(kn, kobj, uid, gid, grp, update);
|
||||
if (error) {
|
||||
|
Reference in New Issue
Block a user