aboutsummaryrefslogtreecommitdiffstats
path: root/block
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@suse.de>2007-04-13 16:15:19 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2007-05-02 21:57:59 -0400
commit823bccfc4002296ba88c3ad0f049e1abd8108d30 (patch)
tree5338ae0b32409446af4cd00c5107d9405d5bf0b6 /block
parent2609e7b9bebfd433254c02538ba803dc516ff674 (diff)
remove "struct subsystem" as it is no longer needed
We need to work on cleaning up the relationship between kobjects, ksets and ktypes. The removal of 'struct subsystem' is the first step of this, especially as it is not really needed at all. Thanks to Kay for fixing the bugs in this patch. Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'block')
-rw-r--r--block/genhd.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/block/genhd.c b/block/genhd.c
index 441432a142f2..b5664440896c 100644
--- a/block/genhd.c
+++ b/block/genhd.c
@@ -17,7 +17,7 @@
17#include <linux/buffer_head.h> 17#include <linux/buffer_head.h>
18#include <linux/mutex.h> 18#include <linux/mutex.h>
19 19
20struct subsystem block_subsys; 20struct kset block_subsys;
21static DEFINE_MUTEX(block_subsys_lock); 21static DEFINE_MUTEX(block_subsys_lock);
22 22
23/* 23/*
@@ -221,7 +221,7 @@ static void *part_start(struct seq_file *part, loff_t *pos)
221 loff_t l = *pos; 221 loff_t l = *pos;
222 222
223 mutex_lock(&block_subsys_lock); 223 mutex_lock(&block_subsys_lock);
224 list_for_each(p, &block_subsys.kset.list) 224 list_for_each(p, &block_subsys.list)
225 if (!l--) 225 if (!l--)
226 return list_entry(p, struct gendisk, kobj.entry); 226 return list_entry(p, struct gendisk, kobj.entry);
227 return NULL; 227 return NULL;
@@ -231,7 +231,7 @@ static void *part_next(struct seq_file *part, void *v, loff_t *pos)
231{ 231{
232 struct list_head *p = ((struct gendisk *)v)->kobj.entry.next; 232 struct list_head *p = ((struct gendisk *)v)->kobj.entry.next;
233 ++*pos; 233 ++*pos;
234 return p==&block_subsys.kset.list ? NULL : 234 return p==&block_subsys.list ? NULL :
235 list_entry(p, struct gendisk, kobj.entry); 235 list_entry(p, struct gendisk, kobj.entry);
236} 236}
237 237
@@ -246,7 +246,7 @@ static int show_partition(struct seq_file *part, void *v)
246 int n; 246 int n;
247 char buf[BDEVNAME_SIZE]; 247 char buf[BDEVNAME_SIZE];
248 248
249 if (&sgp->kobj.entry == block_subsys.kset.list.next) 249 if (&sgp->kobj.entry == block_subsys.list.next)
250 seq_puts(part, "major minor #blocks name\n\n"); 250 seq_puts(part, "major minor #blocks name\n\n");
251 251
252 /* Don't show non-partitionable removeable devices or empty devices */ 252 /* Don't show non-partitionable removeable devices or empty devices */
@@ -565,7 +565,7 @@ static void *diskstats_start(struct seq_file *part, loff_t *pos)
565 struct list_head *p; 565 struct list_head *p;
566 566
567 mutex_lock(&block_subsys_lock); 567 mutex_lock(&block_subsys_lock);
568 list_for_each(p, &block_subsys.kset.list) 568 list_for_each(p, &block_subsys.list)
569 if (!k--) 569 if (!k--)
570 return list_entry(p, struct gendisk, kobj.entry); 570 return list_entry(p, struct gendisk, kobj.entry);
571 return NULL; 571 return NULL;
@@ -575,7 +575,7 @@ static void *diskstats_next(struct seq_file *part, void *v, loff_t *pos)
575{ 575{
576 struct list_head *p = ((struct gendisk *)v)->kobj.entry.next; 576 struct list_head *p = ((struct gendisk *)v)->kobj.entry.next;
577 ++*pos; 577 ++*pos;
578 return p==&block_subsys.kset.list ? NULL : 578 return p==&block_subsys.list ? NULL :
579 list_entry(p, struct gendisk, kobj.entry); 579 list_entry(p, struct gendisk, kobj.entry);
580} 580}
581 581