Prev: [ANNOUNCE] Git 1.7.1.rc1
Next: [PATCH] Fix inappropriate substraction on tracing_pages_allocated in trace_free_page()in 2.6.27.y series kernel
From: David Miller on 11 Apr 2010 00:50 They are allocated dynamically, and thus need sysfs_attr_init() treatment. Signed-off-by: David S. Miller <davem(a)davemloft.net> diff --git a/drivers/scsi/scsi_transport_sas.c b/drivers/scsi/scsi_transport_sas.c index 927e99c..f9c61b9 100644 --- a/drivers/scsi/scsi_transport_sas.c +++ b/drivers/scsi/scsi_transport_sas.c @@ -1679,15 +1679,17 @@ static int sas_user_scan(struct Scsi_Host *shost, uint channel, */ #define SETUP_TEMPLATE(attrb, field, perm, test) \ - i->private_##attrb[count] = dev_attr_##field; \ + i->private_##attrb[count] = dev_attr_##field; \ i->private_##attrb[count].attr.mode = perm; \ + sysfs_attr_init(&i->private_##attrb[count].attr); \ i->attrb[count] = &i->private_##attrb[count]; \ if (test) \ count++ #define SETUP_TEMPLATE_RW(attrb, field, perm, test, ro_test, ro_perm) \ - i->private_##attrb[count] = dev_attr_##field; \ + i->private_##attrb[count] = dev_attr_##field; \ i->private_##attrb[count].attr.mode = perm; \ + sysfs_attr_init(&i->private_##attrb[count].attr); \ if (ro_test) { \ i->private_##attrb[count].attr.mode = ro_perm; \ i->private_##attrb[count].store = NULL; \ -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo(a)vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/ |