scsi: qedi: 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-39-bvanassche@acm.org Signed-off-by: Bart Van Assche <bvanassche@acm.org> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
This commit is contained in:
Родитель
232cb469d2
Коммит
1ebbd3b1d9
|
@ -22,7 +22,7 @@ extern struct iscsi_transport qedi_iscsi_transport;
|
||||||
extern const struct qed_iscsi_ops *qedi_ops;
|
extern const struct qed_iscsi_ops *qedi_ops;
|
||||||
extern const struct qedi_debugfs_ops qedi_debugfs_ops[];
|
extern const struct qedi_debugfs_ops qedi_debugfs_ops[];
|
||||||
extern const struct file_operations qedi_dbg_fops[];
|
extern const struct file_operations qedi_dbg_fops[];
|
||||||
extern struct device_attribute *qedi_shost_attrs[];
|
extern const struct attribute_group *qedi_shost_groups[];
|
||||||
|
|
||||||
int qedi_alloc_sq(struct qedi_ctx *qedi, struct qedi_endpoint *ep);
|
int qedi_alloc_sq(struct qedi_ctx *qedi, struct qedi_endpoint *ep);
|
||||||
void qedi_free_sq(struct qedi_ctx *qedi, struct qedi_endpoint *ep);
|
void qedi_free_sq(struct qedi_ctx *qedi, struct qedi_endpoint *ep);
|
||||||
|
|
|
@ -58,7 +58,7 @@ struct scsi_host_template qedi_host_template = {
|
||||||
.max_sectors = 0xffff,
|
.max_sectors = 0xffff,
|
||||||
.dma_boundary = QEDI_HW_DMA_BOUNDARY,
|
.dma_boundary = QEDI_HW_DMA_BOUNDARY,
|
||||||
.cmd_per_lun = 128,
|
.cmd_per_lun = 128,
|
||||||
.shost_attrs = qedi_shost_attrs,
|
.shost_groups = qedi_shost_groups,
|
||||||
};
|
};
|
||||||
|
|
||||||
static void qedi_conn_free_login_resources(struct qedi_ctx *qedi,
|
static void qedi_conn_free_login_resources(struct qedi_ctx *qedi,
|
||||||
|
|
|
@ -42,8 +42,17 @@ static ssize_t speed_show(struct device *dev,
|
||||||
static DEVICE_ATTR_RO(port_state);
|
static DEVICE_ATTR_RO(port_state);
|
||||||
static DEVICE_ATTR_RO(speed);
|
static DEVICE_ATTR_RO(speed);
|
||||||
|
|
||||||
struct device_attribute *qedi_shost_attrs[] = {
|
static struct attribute *qedi_shost_attrs[] = {
|
||||||
&dev_attr_port_state,
|
&dev_attr_port_state.attr,
|
||||||
&dev_attr_speed,
|
&dev_attr_speed.attr,
|
||||||
|
NULL
|
||||||
|
};
|
||||||
|
|
||||||
|
static const struct attribute_group qedi_shost_attr_group = {
|
||||||
|
.attrs = qedi_shost_attrs
|
||||||
|
};
|
||||||
|
|
||||||
|
const struct attribute_group *qedi_shost_groups[] = {
|
||||||
|
&qedi_shost_attr_group,
|
||||||
NULL
|
NULL
|
||||||
};
|
};
|
||||||
|
|
Загрузка…
Ссылка в новой задаче