blob: ee3d66eb40c68b30d0ebd0ef57066a44974b8f3f [file] [log] [blame]
Christoph Böhmwalder93c68cc2022-11-22 14:43:01 +01001/* SPDX-License-Identifier: GPL-2.0-only */
Lars Ellenberg4d3d5aa2014-05-02 13:19:51 +02002#include <linux/kernel.h>
3#include <linux/module.h>
4#include <linux/debugfs.h>
5
6#include "drbd_int.h"
7
8#ifdef CONFIG_DEBUG_FS
Greg Kroah-Hartmand27e84a2019-06-18 17:45:49 +02009void __init drbd_debugfs_init(void);
Lars Ellenberg4d3d5aa2014-05-02 13:19:51 +020010void drbd_debugfs_cleanup(void);
11
12void drbd_debugfs_resource_add(struct drbd_resource *resource);
13void drbd_debugfs_resource_cleanup(struct drbd_resource *resource);
14
15void drbd_debugfs_connection_add(struct drbd_connection *connection);
16void drbd_debugfs_connection_cleanup(struct drbd_connection *connection);
17
18void drbd_debugfs_device_add(struct drbd_device *device);
19void drbd_debugfs_device_cleanup(struct drbd_device *device);
20
21void drbd_debugfs_peer_device_add(struct drbd_peer_device *peer_device);
22void drbd_debugfs_peer_device_cleanup(struct drbd_peer_device *peer_device);
23#else
24
Greg Kroah-Hartmand27e84a2019-06-18 17:45:49 +020025static inline void __init drbd_debugfs_init(void) { }
Lars Ellenberg4d3d5aa2014-05-02 13:19:51 +020026static inline void drbd_debugfs_cleanup(void) { }
27
28static inline void drbd_debugfs_resource_add(struct drbd_resource *resource) { }
29static inline void drbd_debugfs_resource_cleanup(struct drbd_resource *resource) { }
30
31static inline void drbd_debugfs_connection_add(struct drbd_connection *connection) { }
32static inline void drbd_debugfs_connection_cleanup(struct drbd_connection *connection) { }
33
34static inline void drbd_debugfs_device_add(struct drbd_device *device) { }
35static inline void drbd_debugfs_device_cleanup(struct drbd_device *device) { }
36
37static inline void drbd_debugfs_peer_device_add(struct drbd_peer_device *peer_device) { }
38static inline void drbd_debugfs_peer_device_cleanup(struct drbd_peer_device *peer_device) { }
39
40#endif