Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 195891
b: refs/heads/master
c: 026ec57
h: refs/heads/master
i:
  195889: 87a9c07
  195887: 9a4427e
v: v3
  • Loading branch information
Maxim Levitsky authored and David Woodhouse committed Feb 26, 2010
1 parent e00aee1 commit 5cb792d
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 75c0b84d41c6f08c0cb083464907005683ef2920
refs/heads/master: 026ec57886b67c092bf7baecd029a7c1c4998c28
8 changes: 8 additions & 0 deletions trunk/drivers/mtd/mtd_blkdevs.c
Original file line number Diff line number Diff line change
Expand Up @@ -379,6 +379,10 @@ int add_mtd_blktrans_dev(struct mtd_blktrans_dev *new)
set_disk_ro(gd, 1);

add_disk(gd);

if (new->disk_attributes)
sysfs_create_group(&disk_to_dev(gd)->kobj,
new->disk_attributes);
return 0;
error4:
module_put(tr->owner);
Expand All @@ -405,6 +409,10 @@ int del_mtd_blktrans_dev(struct mtd_blktrans_dev *old)
/* Stop new requests to arrive */
del_gendisk(old->disk);

if (old->disk_attributes)
sysfs_remove_group(&disk_to_dev(old->disk)->kobj,
old->disk_attributes);

/* Stop the thread */
kthread_stop(old->thread);

Expand Down
2 changes: 2 additions & 0 deletions trunk/include/linux/mtd/blktrans.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

#include <linux/mutex.h>
#include <linux/kref.h>
#include <linux/sysfs.h>

struct hd_geometry;
struct mtd_info;
Expand All @@ -28,6 +29,7 @@ struct mtd_blktrans_dev {
int open;
struct kref ref;
struct gendisk *disk;
struct attribute_group *disk_attributes;
struct task_struct *thread;
struct request_queue *rq;
spinlock_t queue_lock;
Expand Down

0 comments on commit 5cb792d

Please sign in to comment.