Commit eb78ac7a authored by Bart Van Assche's avatar Bart Van Assche Committed by Martin K. Petersen
Browse files

scsi: bnx2i: 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-17-bvanassche@acm.org


Signed-off-by: default avatarBart Van Assche <bvanassche@acm.org>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent c3dd11d8
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -795,7 +795,7 @@ extern struct cnic_ulp_ops bnx2i_cnic_cb;
extern unsigned int sq_size;
extern unsigned int rq_size;

extern struct device_attribute *bnx2i_dev_attributes[];
extern const struct attribute_group *bnx2i_dev_groups[];



+1 −1
Original line number Diff line number Diff line
@@ -2266,7 +2266,7 @@ static struct scsi_host_template bnx2i_host_template = {
	.cmd_per_lun		= 128,
	.this_id		= -1,
	.sg_tablesize		= ISCSI_MAX_BDS_PER_CMD,
	.shost_attrs		= bnx2i_dev_attributes,
	.shost_groups		= bnx2i_dev_groups,
	.track_queue_depth	= 1,
};

+12 −3
Original line number Diff line number Diff line
@@ -142,8 +142,17 @@ static DEVICE_ATTR(sq_size, S_IRUGO | S_IWUSR,
static DEVICE_ATTR(num_ccell, S_IRUGO | S_IWUSR,
		   bnx2i_show_ccell_info, bnx2i_set_ccell_info);

struct device_attribute *bnx2i_dev_attributes[] = {
	&dev_attr_sq_size,
	&dev_attr_num_ccell,
static struct attribute *bnx2i_dev_attributes[] = {
	&dev_attr_sq_size.attr,
	&dev_attr_num_ccell.attr,
	NULL
};

static const struct attribute_group bnx2i_dev_attr_group = {
	.attrs = bnx2i_dev_attributes
};

const struct attribute_group *bnx2i_dev_groups[] = {
	&bnx2i_dev_attr_group,
	NULL
};