xpp: stability -- better debug information
Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>
This commit is contained in:
parent
dfa7304f51
commit
235d530fee
@ -30,6 +30,7 @@
|
|||||||
#include <linux/workqueue.h>
|
#include <linux/workqueue.h>
|
||||||
#include <linux/device.h>
|
#include <linux/device.h>
|
||||||
#include <linux/delay.h> /* for msleep() to debug */
|
#include <linux/delay.h> /* for msleep() to debug */
|
||||||
|
#include <linux/sched.h>
|
||||||
#include "xpd.h"
|
#include "xpd.h"
|
||||||
#include "xpp_dahdi.h"
|
#include "xpp_dahdi.h"
|
||||||
#include "xbus-core.h"
|
#include "xbus-core.h"
|
||||||
@ -967,10 +968,13 @@ void xbus_sysfs_remove(xbus_t *xbus)
|
|||||||
struct device *astribank;
|
struct device *astribank;
|
||||||
|
|
||||||
BUG_ON(!xbus);
|
BUG_ON(!xbus);
|
||||||
XBUS_DBG(DEVICES, xbus, "\n");
|
|
||||||
astribank = &xbus->astribank;
|
astribank = &xbus->astribank;
|
||||||
if (!dev_get_drvdata(astribank))
|
if (!dev_get_drvdata(astribank)) {
|
||||||
|
XBUS_NOTICE(xbus, "%s: already removed\n", __func__);
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
XBUS_DBG(DEVICES, xbus, "going to unregister: refcount=%d\n",
|
||||||
|
atomic_read(&astribank->kobj.kref.refcount));
|
||||||
BUG_ON(dev_get_drvdata(astribank) != xbus);
|
BUG_ON(dev_get_drvdata(astribank) != xbus);
|
||||||
device_unregister(astribank);
|
device_unregister(astribank);
|
||||||
dev_set_drvdata(astribank, NULL);
|
dev_set_drvdata(astribank, NULL);
|
||||||
|
Loading…
Reference in New Issue
Block a user