X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=drivers%2Fscsi%2F3w-9xxx.c;h=2239d16fb9b568225df0fa5e0e26eaec4a2be5f7;hb=d21c95c569c462da20d491b75d0a45bd70ddc1bf;hp=51c3ebf1c7d11ecfe93bb1a68c15839e373508ea;hpb=cf816ecb533ab96b883dfdc0db174598b5b5c4d2;p=linux-2.6 diff --git a/drivers/scsi/3w-9xxx.c b/drivers/scsi/3w-9xxx.c index 51c3ebf1c7..2239d16fb9 100644 --- a/drivers/scsi/3w-9xxx.c +++ b/drivers/scsi/3w-9xxx.c @@ -140,9 +140,10 @@ static void twa_unmap_scsi_data(TW_Device_Extension *tw_dev, int request_id); /* Functions */ /* Show some statistics about the card */ -static ssize_t twa_show_stats(struct class_device *class_dev, char *buf) +static ssize_t twa_show_stats(struct device *dev, + struct device_attribute *attr, char *buf) { - struct Scsi_Host *host = class_to_shost(class_dev); + struct Scsi_Host *host = class_to_shost(dev); TW_Device_Extension *tw_dev = (TW_Device_Extension *)host->hostdata; unsigned long flags = 0; ssize_t len; @@ -184,7 +185,7 @@ static int twa_change_queue_depth(struct scsi_device *sdev, int queue_depth) } /* End twa_change_queue_depth() */ /* Create sysfs 'stats' entry */ -static struct class_device_attribute twa_host_stats_attr = { +static struct device_attribute twa_host_stats_attr = { .attr = { .name = "stats", .mode = S_IRUGO, @@ -193,7 +194,7 @@ static struct class_device_attribute twa_host_stats_attr = { }; /* Host attributes initializer */ -static struct class_device_attribute *twa_host_attrs[] = { +static struct device_attribute *twa_host_attrs[] = { &twa_host_stats_attr, NULL, }; @@ -861,6 +862,8 @@ out: } /* End twa_chrdev_ioctl() */ /* This function handles open for the character device */ +/* NOTE that this function will race with remove; adding BKL + will not help. */ static int twa_chrdev_open(struct inode *inode, struct file *file) { unsigned int minor_number;