Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

scsi: bnx2fc: Switch to attribute groups

struct device supports attribute groups directly but does not support
struct device_attribute directly. Hence switch to attribute groups.

Link: https://lore.kernel.org/r/20211012233558.4066756-16-bvanassche@acm.org
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>

authored by

Bart Van Assche and committed by
Martin K. Petersen
c3dd11d8 e73af234

+5 -3
+5 -3
drivers/scsi/bnx2fc/bnx2fc_fcoe.c
··· 2951 2951 static DEVICE_ATTR(tm_timeout, S_IRUGO|S_IWUSR, bnx2fc_tm_timeout_show, 2952 2952 bnx2fc_tm_timeout_store); 2953 2953 2954 - static struct device_attribute *bnx2fc_host_attrs[] = { 2955 - &dev_attr_tm_timeout, 2954 + static struct attribute *bnx2fc_host_attrs[] = { 2955 + &dev_attr_tm_timeout.attr, 2956 2956 NULL, 2957 2957 }; 2958 + 2959 + ATTRIBUTE_GROUPS(bnx2fc_host); 2958 2960 2959 2961 /* 2960 2962 * scsi_host_template structure used while registering with SCSI-ml ··· 2979 2977 .max_sectors = 0x3fbf, 2980 2978 .track_queue_depth = 1, 2981 2979 .slave_configure = bnx2fc_slave_configure, 2982 - .shost_attrs = bnx2fc_host_attrs, 2980 + .shost_groups = bnx2fc_host_groups, 2983 2981 }; 2984 2982 2985 2983 static struct libfc_function_template bnx2fc_libfc_fcn_templ = {