ARM: 6069/1: perf-events: use numeric ID to identify PMU
[pandora-kernel.git] / block / blk-integrity.c
index 73e28d3..96e83c2 100644 (file)
@@ -278,7 +278,7 @@ static struct attribute *integrity_attrs[] = {
        NULL,
 };
 
-static struct sysfs_ops integrity_ops = {
+static const struct sysfs_ops integrity_ops = {
        .show   = &integrity_attr_show,
        .store  = &integrity_attr_store,
 };
@@ -379,6 +379,7 @@ void blk_integrity_unregister(struct gendisk *disk)
 
        kobject_uevent(&bi->kobj, KOBJ_REMOVE);
        kobject_del(&bi->kobj);
+       kobject_put(&bi->kobj);
        kmem_cache_free(integrity_cachep, bi);
        disk->integrity = NULL;
 }