Re: [PATCH v2 3/6] hvcs: Use driver groups to manage driver attributes

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

 



On Thu, Feb 02, 2023 at 04:28:01PM -0600, Brian King wrote:
> Rather than manually creating attributes for the hvcs driver,
> let the driver core do this for us. This also fixes some hotplug
> remove issues and ensures that cleanup of these attributes
> is done in the right order.
> 
> Signed-off-by: Brian King <brking@xxxxxxxxxxxxxxxxxx>
> ---
>  drivers/tty/hvc/hvcs.c | 24 +++++++++++++++---------
>  1 file changed, 15 insertions(+), 9 deletions(-)
> 
> diff --git a/drivers/tty/hvc/hvcs.c b/drivers/tty/hvc/hvcs.c
> index 7f79444b4d89..5de7ad555540 100644
> --- a/drivers/tty/hvc/hvcs.c
> +++ b/drivers/tty/hvc/hvcs.c
> @@ -473,6 +473,20 @@ static ssize_t rescan_store(struct device_driver *ddp, const char * buf,
>  
>  static DRIVER_ATTR_RW(rescan);
>  
> +static struct attribute *hvcs_attrs[] = {
> +	&driver_attr_rescan.attr,
> +	NULL,
> +};
> +
> +static struct attribute_group hvcs_attr_group = {
> +	.attrs = hvcs_attrs,
> +};
> +
> +const static struct attribute_group *hvcs_attr_groups[] = {
> +	&hvcs_attr_group,
> +	NULL,
> +};

Again, ATTRIBUTE_GROUPS()?

thanks,

greg k-h



[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux PPP]     [Linux FS]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Linmodem]     [Device Mapper]     [Linux Kernel for ARM]

  Powered by Linux