diff options
author | Greg Kroah-Hartman <gregkh@suse.de> | 2010-03-15 16:59:51 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2010-03-19 10:12:12 -0400 |
commit | c7df670bf702d1c25ae22b4cd49deb05c1e55ecc (patch) | |
tree | 85c2e496045e3e659afdaee409b1fad5e34a944b /drivers/char/ipmi/ipmi_msghandler.c | |
parent | 6757eca348fbbdd4ab1020e565f325cd6a6b2698 (diff) |
sysfs: fix sysfs lockdep warning in ipmi code
This fixes a sysfs lockdep warning in the ipmi code.
Thanks to Eric Biederman and Yinghai Lu for the original versions of the
patch, unfortunatly they did not submit them in a form they could be
applied in.
Cc: Yinghai Lu <yinghai@kernel.org>
Cc: Eric Biederman <ebiederm@xmission.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/char/ipmi/ipmi_msghandler.c')
-rw-r--r-- | drivers/char/ipmi/ipmi_msghandler.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/char/ipmi/ipmi_msghandler.c b/drivers/char/ipmi/ipmi_msghandler.c index ec5e3f8df648..c6ad4234378d 100644 --- a/drivers/char/ipmi/ipmi_msghandler.c +++ b/drivers/char/ipmi/ipmi_msghandler.c | |||
@@ -2272,42 +2272,52 @@ static int create_files(struct bmc_device *bmc) | |||
2272 | bmc->device_id_attr.attr.name = "device_id"; | 2272 | bmc->device_id_attr.attr.name = "device_id"; |
2273 | bmc->device_id_attr.attr.mode = S_IRUGO; | 2273 | bmc->device_id_attr.attr.mode = S_IRUGO; |
2274 | bmc->device_id_attr.show = device_id_show; | 2274 | bmc->device_id_attr.show = device_id_show; |
2275 | sysfs_attr_init(&bmc->device_id_attr.attr); | ||
2275 | 2276 | ||
2276 | bmc->provides_dev_sdrs_attr.attr.name = "provides_device_sdrs"; | 2277 | bmc->provides_dev_sdrs_attr.attr.name = "provides_device_sdrs"; |
2277 | bmc->provides_dev_sdrs_attr.attr.mode = S_IRUGO; | 2278 | bmc->provides_dev_sdrs_attr.attr.mode = S_IRUGO; |
2278 | bmc->provides_dev_sdrs_attr.show = provides_dev_sdrs_show; | 2279 | bmc->provides_dev_sdrs_attr.show = provides_dev_sdrs_show; |
2280 | sysfs_attr_init(&bmc->provides_dev_sdrs_attr.attr); | ||
2279 | 2281 | ||
2280 | bmc->revision_attr.attr.name = "revision"; | 2282 | bmc->revision_attr.attr.name = "revision"; |
2281 | bmc->revision_attr.attr.mode = S_IRUGO; | 2283 | bmc->revision_attr.attr.mode = S_IRUGO; |
2282 | bmc->revision_attr.show = revision_show; | 2284 | bmc->revision_attr.show = revision_show; |
2285 | sysfs_attr_init(&bmc->revision_attr.attr); | ||
2283 | 2286 | ||
2284 | bmc->firmware_rev_attr.attr.name = "firmware_revision"; | 2287 | bmc->firmware_rev_attr.attr.name = "firmware_revision"; |
2285 | bmc->firmware_rev_attr.attr.mode = S_IRUGO; | 2288 | bmc->firmware_rev_attr.attr.mode = S_IRUGO; |
2286 | bmc->firmware_rev_attr.show = firmware_rev_show; | 2289 | bmc->firmware_rev_attr.show = firmware_rev_show; |
2290 | sysfs_attr_init(&bmc->firmware_rev_attr.attr); | ||
2287 | 2291 | ||
2288 | bmc->version_attr.attr.name = "ipmi_version"; | 2292 | bmc->version_attr.attr.name = "ipmi_version"; |
2289 | bmc->version_attr.attr.mode = S_IRUGO; | 2293 | bmc->version_attr.attr.mode = S_IRUGO; |
2290 | bmc->version_attr.show = ipmi_version_show; | 2294 | bmc->version_attr.show = ipmi_version_show; |
2295 | sysfs_attr_init(&bmc->version_attr.attr); | ||
2291 | 2296 | ||
2292 | bmc->add_dev_support_attr.attr.name = "additional_device_support"; | 2297 | bmc->add_dev_support_attr.attr.name = "additional_device_support"; |
2293 | bmc->add_dev_support_attr.attr.mode = S_IRUGO; | 2298 | bmc->add_dev_support_attr.attr.mode = S_IRUGO; |
2294 | bmc->add_dev_support_attr.show = add_dev_support_show; | 2299 | bmc->add_dev_support_attr.show = add_dev_support_show; |
2300 | sysfs_attr_init(&bmc->add_dev_support_attr.attr); | ||
2295 | 2301 | ||
2296 | bmc->manufacturer_id_attr.attr.name = "manufacturer_id"; | 2302 | bmc->manufacturer_id_attr.attr.name = "manufacturer_id"; |
2297 | bmc->manufacturer_id_attr.attr.mode = S_IRUGO; | 2303 | bmc->manufacturer_id_attr.attr.mode = S_IRUGO; |
2298 | bmc->manufacturer_id_attr.show = manufacturer_id_show; | 2304 | bmc->manufacturer_id_attr.show = manufacturer_id_show; |
2305 | sysfs_attr_init(&bmc->manufacturer_id_attr.attr); | ||
2299 | 2306 | ||
2300 | bmc->product_id_attr.attr.name = "product_id"; | 2307 | bmc->product_id_attr.attr.name = "product_id"; |
2301 | bmc->product_id_attr.attr.mode = S_IRUGO; | 2308 | bmc->product_id_attr.attr.mode = S_IRUGO; |
2302 | bmc->product_id_attr.show = product_id_show; | 2309 | bmc->product_id_attr.show = product_id_show; |
2310 | sysfs_attr_init(&bmc->product_id_attr.attr); | ||
2303 | 2311 | ||
2304 | bmc->guid_attr.attr.name = "guid"; | 2312 | bmc->guid_attr.attr.name = "guid"; |
2305 | bmc->guid_attr.attr.mode = S_IRUGO; | 2313 | bmc->guid_attr.attr.mode = S_IRUGO; |
2306 | bmc->guid_attr.show = guid_show; | 2314 | bmc->guid_attr.show = guid_show; |
2315 | sysfs_attr_init(&bmc->guid_attr.attr); | ||
2307 | 2316 | ||
2308 | bmc->aux_firmware_rev_attr.attr.name = "aux_firmware_revision"; | 2317 | bmc->aux_firmware_rev_attr.attr.name = "aux_firmware_revision"; |
2309 | bmc->aux_firmware_rev_attr.attr.mode = S_IRUGO; | 2318 | bmc->aux_firmware_rev_attr.attr.mode = S_IRUGO; |
2310 | bmc->aux_firmware_rev_attr.show = aux_firmware_rev_show; | 2319 | bmc->aux_firmware_rev_attr.show = aux_firmware_rev_show; |
2320 | sysfs_attr_init(&bmc->aux_firmware_rev_attr.attr); | ||
2311 | 2321 | ||
2312 | err = device_create_file(&bmc->dev->dev, | 2322 | err = device_create_file(&bmc->dev->dev, |
2313 | &bmc->device_id_attr); | 2323 | &bmc->device_id_attr); |