Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 75714
b: refs/heads/master
c: 6013c12
h: refs/heads/master
v: v3
  • Loading branch information
Tony Jones authored and Greg Kroah-Hartman committed Jan 25, 2008
1 parent e97ea53 commit ddb6079
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 11 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: aa2758261469374b598e2a6a2702e000a6ab2fbb
refs/heads/master: 6013c12be8313b3205b41912d965b03f3b06147d
16 changes: 7 additions & 9 deletions trunk/drivers/block/pktcdvd.c
Original file line number Diff line number Diff line change
Expand Up @@ -301,18 +301,16 @@ static struct kobj_type kobj_pkt_type_wqueue = {
static void pkt_sysfs_dev_new(struct pktcdvd_device *pd)
{
if (class_pktcdvd) {
pd->clsdev = class_device_create(class_pktcdvd,
NULL, pd->pkt_dev,
NULL, "%s", pd->name);
if (IS_ERR(pd->clsdev))
pd->clsdev = NULL;
pd->dev = device_create(class_pktcdvd, NULL, pd->pkt_dev, "%s", pd->name);
if (IS_ERR(pd->dev))
pd->dev = NULL;
}
if (pd->clsdev) {
if (pd->dev) {
pd->kobj_stat = pkt_kobj_create(pd, "stat",
&pd->clsdev->kobj,
&pd->dev->kobj,
&kobj_pkt_type_stat);
pd->kobj_wqueue = pkt_kobj_create(pd, "write_queue",
&pd->clsdev->kobj,
&pd->dev->kobj,
&kobj_pkt_type_wqueue);
}
}
Expand All @@ -322,7 +320,7 @@ static void pkt_sysfs_dev_remove(struct pktcdvd_device *pd)
pkt_kobj_remove(pd->kobj_stat);
pkt_kobj_remove(pd->kobj_wqueue);
if (class_pktcdvd)
class_device_destroy(class_pktcdvd, pd->pkt_dev);
device_destroy(class_pktcdvd, pd->pkt_dev);
}


Expand Down
2 changes: 1 addition & 1 deletion trunk/include/linux/pktcdvd.h
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ struct pktcdvd_device
int write_congestion_off;
int write_congestion_on;

struct class_device *clsdev; /* sysfs pktcdvd[0-7] class dev */
struct device *dev; /* sysfs pktcdvd[0-7] dev */
struct pktcdvd_kobj *kobj_stat; /* sysfs pktcdvd[0-7]/stat/ */
struct pktcdvd_kobj *kobj_wqueue; /* sysfs pktcdvd[0-7]/write_queue/ */

Expand Down

0 comments on commit ddb6079

Please sign in to comment.