diff options
author | David Vrabel <david.vrabel@csr.com> | 2008-12-22 13:22:50 -0500 |
---|---|---|
committer | David Vrabel <david.vrabel@csr.com> | 2008-12-22 13:22:50 -0500 |
commit | bce83697c5fe84a7a5d38c96fbbe43b4bc028c3e (patch) | |
tree | b8e920af66f5b4de509e95a7295cedbe42878dd6 /drivers/uwb/lc-dev.c | |
parent | 02f11ee181baa562df23e105ba930902f0d0b1bf (diff) |
uwb: use dev_dbg() for debug messages
Instead of the home-grown d_fnstart(), d_fnend() and d_printf() macros,
use dev_dbg() or remove the message entirely.
Signed-off-by: David Vrabel <david.vrabel@csr.com>
Diffstat (limited to 'drivers/uwb/lc-dev.c')
-rw-r--r-- | drivers/uwb/lc-dev.c | 21 |
1 files changed, 2 insertions, 19 deletions
diff --git a/drivers/uwb/lc-dev.c b/drivers/uwb/lc-dev.c index 15f856c9689a..f78087b85918 100644 --- a/drivers/uwb/lc-dev.c +++ b/drivers/uwb/lc-dev.c | |||
@@ -22,7 +22,6 @@ | |||
22 | * | 22 | * |
23 | * FIXME: docs | 23 | * FIXME: docs |
24 | */ | 24 | */ |
25 | |||
26 | #include <linux/kernel.h> | 25 | #include <linux/kernel.h> |
27 | #include <linux/device.h> | 26 | #include <linux/device.h> |
28 | #include <linux/err.h> | 27 | #include <linux/err.h> |
@@ -30,10 +29,6 @@ | |||
30 | #include <linux/random.h> | 29 | #include <linux/random.h> |
31 | #include "uwb-internal.h" | 30 | #include "uwb-internal.h" |
32 | 31 | ||
33 | #define D_LOCAL 1 | ||
34 | #include <linux/uwb/debug.h> | ||
35 | |||
36 | |||
37 | /* We initialize addresses to 0xff (invalid, as it is bcast) */ | 32 | /* We initialize addresses to 0xff (invalid, as it is bcast) */ |
38 | static inline void uwb_dev_addr_init(struct uwb_dev_addr *addr) | 33 | static inline void uwb_dev_addr_init(struct uwb_dev_addr *addr) |
39 | { | 34 | { |
@@ -104,12 +99,9 @@ static void uwb_dev_sys_release(struct device *dev) | |||
104 | { | 99 | { |
105 | struct uwb_dev *uwb_dev = to_uwb_dev(dev); | 100 | struct uwb_dev *uwb_dev = to_uwb_dev(dev); |
106 | 101 | ||
107 | d_fnstart(4, NULL, "(dev %p uwb_dev %p)\n", dev, uwb_dev); | ||
108 | uwb_bce_put(uwb_dev->bce); | 102 | uwb_bce_put(uwb_dev->bce); |
109 | d_printf(0, &uwb_dev->dev, "uwb_dev %p freed\n", uwb_dev); | ||
110 | memset(uwb_dev, 0x69, sizeof(*uwb_dev)); | 103 | memset(uwb_dev, 0x69, sizeof(*uwb_dev)); |
111 | kfree(uwb_dev); | 104 | kfree(uwb_dev); |
112 | d_fnend(4, NULL, "(dev %p uwb_dev %p) = void\n", dev, uwb_dev); | ||
113 | } | 105 | } |
114 | 106 | ||
115 | /* | 107 | /* |
@@ -275,12 +267,8 @@ static struct attribute_group *groups[] = { | |||
275 | */ | 267 | */ |
276 | static int __uwb_dev_sys_add(struct uwb_dev *uwb_dev, struct device *parent_dev) | 268 | static int __uwb_dev_sys_add(struct uwb_dev *uwb_dev, struct device *parent_dev) |
277 | { | 269 | { |
278 | int result; | ||
279 | struct device *dev; | 270 | struct device *dev; |
280 | 271 | ||
281 | d_fnstart(4, NULL, "(uwb_dev %p parent_dev %p)\n", uwb_dev, parent_dev); | ||
282 | BUG_ON(parent_dev == NULL); | ||
283 | |||
284 | dev = &uwb_dev->dev; | 272 | dev = &uwb_dev->dev; |
285 | /* Device sysfs files are only useful for neighbor devices not | 273 | /* Device sysfs files are only useful for neighbor devices not |
286 | local radio controllers. */ | 274 | local radio controllers. */ |
@@ -289,18 +277,14 @@ static int __uwb_dev_sys_add(struct uwb_dev *uwb_dev, struct device *parent_dev) | |||
289 | dev->parent = parent_dev; | 277 | dev->parent = parent_dev; |
290 | dev_set_drvdata(dev, uwb_dev); | 278 | dev_set_drvdata(dev, uwb_dev); |
291 | 279 | ||
292 | result = device_add(dev); | 280 | return device_add(dev); |
293 | d_fnend(4, NULL, "(uwb_dev %p parent_dev %p) = %d\n", uwb_dev, parent_dev, result); | ||
294 | return result; | ||
295 | } | 281 | } |
296 | 282 | ||
297 | 283 | ||
298 | static void __uwb_dev_sys_rm(struct uwb_dev *uwb_dev) | 284 | static void __uwb_dev_sys_rm(struct uwb_dev *uwb_dev) |
299 | { | 285 | { |
300 | d_fnstart(4, NULL, "(uwb_dev %p)\n", uwb_dev); | ||
301 | dev_set_drvdata(&uwb_dev->dev, NULL); | 286 | dev_set_drvdata(&uwb_dev->dev, NULL); |
302 | device_del(&uwb_dev->dev); | 287 | device_del(&uwb_dev->dev); |
303 | d_fnend(4, NULL, "(uwb_dev %p) = void\n", uwb_dev); | ||
304 | } | 288 | } |
305 | 289 | ||
306 | 290 | ||
@@ -384,7 +368,6 @@ int __uwb_dev_offair(struct uwb_dev *uwb_dev, struct uwb_rc *rc) | |||
384 | struct device *dev = &uwb_dev->dev; | 368 | struct device *dev = &uwb_dev->dev; |
385 | char macbuf[UWB_ADDR_STRSIZE], devbuf[UWB_ADDR_STRSIZE]; | 369 | char macbuf[UWB_ADDR_STRSIZE], devbuf[UWB_ADDR_STRSIZE]; |
386 | 370 | ||
387 | d_fnstart(3, NULL, "(dev %p [uwb_dev %p], uwb_rc %p)\n", dev, uwb_dev, rc); | ||
388 | uwb_mac_addr_print(macbuf, sizeof(macbuf), &uwb_dev->mac_addr); | 371 | uwb_mac_addr_print(macbuf, sizeof(macbuf), &uwb_dev->mac_addr); |
389 | uwb_dev_addr_print(devbuf, sizeof(devbuf), &uwb_dev->dev_addr); | 372 | uwb_dev_addr_print(devbuf, sizeof(devbuf), &uwb_dev->dev_addr); |
390 | dev_info(dev, "uwb device (mac %s dev %s) disconnected from %s %s\n", | 373 | dev_info(dev, "uwb device (mac %s dev %s) disconnected from %s %s\n", |
@@ -393,7 +376,7 @@ int __uwb_dev_offair(struct uwb_dev *uwb_dev, struct uwb_rc *rc) | |||
393 | rc ? dev_name(rc->uwb_dev.dev.parent) : ""); | 376 | rc ? dev_name(rc->uwb_dev.dev.parent) : ""); |
394 | uwb_dev_rm(uwb_dev); | 377 | uwb_dev_rm(uwb_dev); |
395 | uwb_dev_put(uwb_dev); /* for the creation in _onair() */ | 378 | uwb_dev_put(uwb_dev); /* for the creation in _onair() */ |
396 | d_fnend(3, NULL, "(dev %p [uwb_dev %p], uwb_rc %p) = 0\n", dev, uwb_dev, rc); | 379 | |
397 | return 0; | 380 | return 0; |
398 | } | 381 | } |
399 | 382 | ||