diff options
author | Ingo Molnar <mingo@elte.hu> | 2008-10-03 19:28:46 +0200 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-10-03 19:28:46 +0200 |
commit | f68ec0c24755e5cdb779be6240925f2175311d84 (patch) | |
tree | a7b7128e61a8456385d82bd1c7ca5f14eecbf2ca /drivers/dca/dca-sysfs.c | |
parent | 98920dc3d1113b883cbc73e3293446d3525c6042 (diff) | |
parent | 94aca1dac6f6d21f4b07e4864baf7768cabcc6e7 (diff) |
Merge commit 'v2.6.27-rc8' into x86/setup
Diffstat (limited to 'drivers/dca/dca-sysfs.c')
-rw-r--r-- | drivers/dca/dca-sysfs.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/dca/dca-sysfs.c b/drivers/dca/dca-sysfs.c index 011328faa5f..7af4b403bd2 100644 --- a/drivers/dca/dca-sysfs.c +++ b/drivers/dca/dca-sysfs.c @@ -13,9 +13,11 @@ static spinlock_t dca_idr_lock; int dca_sysfs_add_req(struct dca_provider *dca, struct device *dev, int slot) { struct device *cd; + static int req_count; - cd = device_create(dca_class, dca->cd, MKDEV(0, slot + 1), - "requester%d", slot); + cd = device_create_drvdata(dca_class, dca->cd, + MKDEV(0, slot + 1), NULL, + "requester%d", req_count++); if (IS_ERR(cd)) return PTR_ERR(cd); return 0; @@ -46,7 +48,8 @@ idr_try_again: return err; } - cd = device_create(dca_class, dev, MKDEV(0, 0), "dca%d", dca->id); + cd = device_create_drvdata(dca_class, dev, MKDEV(0, 0), NULL, + "dca%d", dca->id); if (IS_ERR(cd)) { spin_lock(&dca_idr_lock); idr_remove(&dca_idr, dca->id); |