summaryrefslogtreecommitdiffstats
path: root/include/linux/device.h
diff options
context:
space:
mode:
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>2021-05-17 15:29:46 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2021-06-15 17:14:36 +0200
commit09705dcb63d269000595284b5dd7f5c938d647b9 (patch)
treeea54f02454e42ee068b88ee891041574758ae76c /include/linux/device.h
parenta7f1d03b6046cf44f1dd702aeaad3b5e4d7b33a5 (diff)
downloadlinux-09705dcb63d269000595284b5dd7f5c938d647b9.tar.bz2
devres: Enable trace events
In some cases the printf() mechanism is too heavy and can't be used. For example, when debugging a race condition involving devres API. When CONFIG_DEBUG_DEVRES is enabled I can't reproduce an issue, and otherwise it's quite visible with a useful information being collected. Enable trace events for devres part of the driver core. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://lore.kernel.org/r/20210517122946.53161-4-andriy.shevchenko@linux.intel.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/linux/device.h')
-rw-r--r--include/linux/device.h9
1 files changed, 0 insertions, 9 deletions
diff --git a/include/linux/device.h b/include/linux/device.h
index f1a00040fa53..b630f183f504 100644
--- a/include/linux/device.h
+++ b/include/linux/device.h
@@ -165,21 +165,12 @@ void device_remove_bin_file(struct device *dev,
typedef void (*dr_release_t)(struct device *dev, void *res);
typedef int (*dr_match_t)(struct device *dev, void *res, void *match_data);
-#ifdef CONFIG_DEBUG_DEVRES
void *__devres_alloc_node(dr_release_t release, size_t size, gfp_t gfp,
int nid, const char *name) __malloc;
#define devres_alloc(release, size, gfp) \
__devres_alloc_node(release, size, gfp, NUMA_NO_NODE, #release)
#define devres_alloc_node(release, size, gfp, nid) \
__devres_alloc_node(release, size, gfp, nid, #release)
-#else
-void *devres_alloc_node(dr_release_t release, size_t size,
- gfp_t gfp, int nid) __malloc;
-static inline void *devres_alloc(dr_release_t release, size_t size, gfp_t gfp)
-{
- return devres_alloc_node(release, size, gfp, NUMA_NO_NODE);
-}
-#endif
void devres_for_each_res(struct device *dev, dr_release_t release,
dr_match_t match, void *match_data,