Re: [PATCH v3 3/6] block: refactor sysfs code

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

 



> -static void disk_add_events(struct gendisk *disk)
> +static void disk_add_sysfs(struct gendisk *disk)
>  {
>  	/* FIXME: error handling */
> -	if (sysfs_create_files(&disk_to_dev(disk)->kobj, disk_events_attrs) < 0)
> +	if (sysfs_create_files(&disk_to_dev(disk)->kobj, disk_sysfs_attrs) < 0)
>  		pr_warn("%s: failed to create sysfs files for events\n",
>  			disk->disk_name);
> +}

Actually, what we need here is a way how we can setup the ->groups
field of the device to include all attribute groups instead of having
to call sysfs_create_files at all.



[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux