@@ -64,7 +64,7 @@ static ssize_t arcmsr_sysfs_iop_message_read(struct file *filp,
char *buf, loff_t off,
size_t count)
{
- struct device *dev = container_of(kobj,struct device,kobj);
+ struct device *dev = kobj_to_dev(kobj);
struct Scsi_Host *host = class_to_shost(dev);
struct AdapterControlBlock *acb = (struct AdapterControlBlock *) host->hostdata;
uint8_t *ptmpQbuffer;
@@ -111,7 +111,7 @@ static ssize_t arcmsr_sysfs_iop_message_write(struct file *filp,
char *buf, loff_t off,
size_t count)
{
- struct device *dev = container_of(kobj,struct device,kobj);
+ struct device *dev = kobj_to_dev(kobj);
struct Scsi_Host *host = class_to_shost(dev);
struct AdapterControlBlock *acb = (struct AdapterControlBlock *) host->hostdata;
int32_t user_len, cnt2end;
@@ -159,7 +159,7 @@ static ssize_t arcmsr_sysfs_iop_message_clear(struct file *filp,
char *buf, loff_t off,
size_t count)
{
- struct device *dev = container_of(kobj,struct device,kobj);
+ struct device *dev = kobj_to_dev(kobj);
struct Scsi_Host *host = class_to_shost(dev);
struct AdapterControlBlock *acb = (struct AdapterControlBlock *) host->hostdata;
uint8_t *pQbuffer;