diff options
author | Tomas Winkler <tomas.winkler@intel.com> | 2012-11-01 15:17:17 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-11-01 15:31:19 -0400 |
commit | c7d3df354dcb7477900b29a1200744a8c976c03a (patch) | |
tree | 173ff046ddf47c3a20267d052f5d15ea08ffb2dd /drivers/misc | |
parent | 15ea19105bdeef36820ade6754b9b7f1e3511e98 (diff) |
mei: use internal watchdog device registration tracking
remove bool wd_interface_reg as watchdog device already
keeps track of its registration
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/misc')
-rw-r--r-- | drivers/misc/mei/init.c | 2 | ||||
-rw-r--r-- | drivers/misc/mei/mei_dev.h | 1 | ||||
-rw-r--r-- | drivers/misc/mei/wd.c | 5 |
3 files changed, 1 insertions, 7 deletions
diff --git a/drivers/misc/mei/init.c b/drivers/misc/mei/init.c index 4a8eb920f7fb..8c3c2689f70c 100644 --- a/drivers/misc/mei/init.c +++ b/drivers/misc/mei/init.c | |||
@@ -111,8 +111,6 @@ struct mei_device *mei_device_init(struct pci_dev *pdev) | |||
111 | init_waitqueue_head(&dev->wait_stop_wd); | 111 | init_waitqueue_head(&dev->wait_stop_wd); |
112 | dev->dev_state = MEI_DEV_INITIALIZING; | 112 | dev->dev_state = MEI_DEV_INITIALIZING; |
113 | dev->iamthif_state = MEI_IAMTHIF_IDLE; | 113 | dev->iamthif_state = MEI_IAMTHIF_IDLE; |
114 | dev->wd_interface_reg = false; | ||
115 | |||
116 | 114 | ||
117 | mei_io_list_init(&dev->read_list); | 115 | mei_io_list_init(&dev->read_list); |
118 | mei_io_list_init(&dev->write_list); | 116 | mei_io_list_init(&dev->write_list); |
diff --git a/drivers/misc/mei/mei_dev.h b/drivers/misc/mei/mei_dev.h index 57a5a4e4ee4d..8b96d99b8577 100644 --- a/drivers/misc/mei/mei_dev.h +++ b/drivers/misc/mei/mei_dev.h | |||
@@ -249,7 +249,6 @@ struct mei_device { | |||
249 | 249 | ||
250 | struct mei_cl wd_cl; | 250 | struct mei_cl wd_cl; |
251 | enum mei_wd_states wd_state; | 251 | enum mei_wd_states wd_state; |
252 | bool wd_interface_reg; | ||
253 | bool wd_pending; | 252 | bool wd_pending; |
254 | u16 wd_timeout; | 253 | u16 wd_timeout; |
255 | unsigned char wd_data[MEI_WD_START_MSG_SIZE]; | 254 | unsigned char wd_data[MEI_WD_START_MSG_SIZE]; |
diff --git a/drivers/misc/mei/wd.c b/drivers/misc/mei/wd.c index 8edb054d4b36..4fc2b3d4680a 100644 --- a/drivers/misc/mei/wd.c +++ b/drivers/misc/mei/wd.c | |||
@@ -360,23 +360,20 @@ void mei_watchdog_register(struct mei_device *dev) | |||
360 | if (watchdog_register_device(&amt_wd_dev)) { | 360 | if (watchdog_register_device(&amt_wd_dev)) { |
361 | dev_err(&dev->pdev->dev, | 361 | dev_err(&dev->pdev->dev, |
362 | "wd: unable to register watchdog device.\n"); | 362 | "wd: unable to register watchdog device.\n"); |
363 | dev->wd_interface_reg = false; | ||
364 | return; | 363 | return; |
365 | } | 364 | } |
366 | 365 | ||
367 | dev_dbg(&dev->pdev->dev, | 366 | dev_dbg(&dev->pdev->dev, |
368 | "wd: successfully register watchdog interface.\n"); | 367 | "wd: successfully register watchdog interface.\n"); |
369 | dev->wd_interface_reg = true; | ||
370 | watchdog_set_drvdata(&amt_wd_dev, dev); | 368 | watchdog_set_drvdata(&amt_wd_dev, dev); |
371 | } | 369 | } |
372 | 370 | ||
373 | void mei_watchdog_unregister(struct mei_device *dev) | 371 | void mei_watchdog_unregister(struct mei_device *dev) |
374 | { | 372 | { |
375 | if (!dev->wd_interface_reg) | 373 | if (test_bit(WDOG_UNREGISTERED, &amt_wd_dev.status)) |
376 | return; | 374 | return; |
377 | 375 | ||
378 | watchdog_set_drvdata(&amt_wd_dev, NULL); | 376 | watchdog_set_drvdata(&amt_wd_dev, NULL); |
379 | watchdog_unregister_device(&amt_wd_dev); | 377 | watchdog_unregister_device(&amt_wd_dev); |
380 | dev->wd_interface_reg = false; | ||
381 | } | 378 | } |
382 | 379 | ||