mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-18 10:13:57 +08:00
scsi: aacraid: 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-12-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:
parent
90cb6538b5
commit
bd16d71185
@ -605,12 +605,14 @@ static struct device_attribute aac_unique_id_attr = {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
static struct device_attribute *aac_dev_attrs[] = {
|
static struct attribute *aac_dev_attrs[] = {
|
||||||
&aac_raid_level_attr,
|
&aac_raid_level_attr.attr,
|
||||||
&aac_unique_id_attr,
|
&aac_unique_id_attr.attr,
|
||||||
NULL,
|
NULL,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
ATTRIBUTE_GROUPS(aac_dev);
|
||||||
|
|
||||||
static int aac_ioctl(struct scsi_device *sdev, unsigned int cmd,
|
static int aac_ioctl(struct scsi_device *sdev, unsigned int cmd,
|
||||||
void __user *arg)
|
void __user *arg)
|
||||||
{
|
{
|
||||||
@ -1442,21 +1444,23 @@ static struct device_attribute aac_reset = {
|
|||||||
.show = aac_show_reset_adapter,
|
.show = aac_show_reset_adapter,
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct device_attribute *aac_attrs[] = {
|
static struct attribute *aac_host_attrs[] = {
|
||||||
&aac_model,
|
&aac_model.attr,
|
||||||
&aac_vendor,
|
&aac_vendor.attr,
|
||||||
&aac_flags,
|
&aac_flags.attr,
|
||||||
&aac_kernel_version,
|
&aac_kernel_version.attr,
|
||||||
&aac_monitor_version,
|
&aac_monitor_version.attr,
|
||||||
&aac_bios_version,
|
&aac_bios_version.attr,
|
||||||
&aac_lld_version,
|
&aac_lld_version.attr,
|
||||||
&aac_serial_number,
|
&aac_serial_number.attr,
|
||||||
&aac_max_channel,
|
&aac_max_channel.attr,
|
||||||
&aac_max_id,
|
&aac_max_id.attr,
|
||||||
&aac_reset,
|
&aac_reset.attr,
|
||||||
NULL
|
NULL
|
||||||
};
|
};
|
||||||
|
|
||||||
|
ATTRIBUTE_GROUPS(aac_host);
|
||||||
|
|
||||||
ssize_t aac_get_serial_number(struct device *device, char *buf)
|
ssize_t aac_get_serial_number(struct device *device, char *buf)
|
||||||
{
|
{
|
||||||
return aac_show_serial_number(device, &aac_serial_number, buf);
|
return aac_show_serial_number(device, &aac_serial_number, buf);
|
||||||
@ -1483,10 +1487,10 @@ static struct scsi_host_template aac_driver_template = {
|
|||||||
#endif
|
#endif
|
||||||
.queuecommand = aac_queuecommand,
|
.queuecommand = aac_queuecommand,
|
||||||
.bios_param = aac_biosparm,
|
.bios_param = aac_biosparm,
|
||||||
.shost_attrs = aac_attrs,
|
.shost_groups = aac_host_groups,
|
||||||
.slave_configure = aac_slave_configure,
|
.slave_configure = aac_slave_configure,
|
||||||
.change_queue_depth = aac_change_queue_depth,
|
.change_queue_depth = aac_change_queue_depth,
|
||||||
.sdev_attrs = aac_dev_attrs,
|
.sdev_groups = aac_dev_groups,
|
||||||
.eh_abort_handler = aac_eh_abort,
|
.eh_abort_handler = aac_eh_abort,
|
||||||
.eh_device_reset_handler = aac_eh_dev_reset,
|
.eh_device_reset_handler = aac_eh_dev_reset,
|
||||||
.eh_target_reset_handler = aac_eh_target_reset,
|
.eh_target_reset_handler = aac_eh_target_reset,
|
||||||
|
Loading…
Reference in New Issue
Block a user