#include <linux/device.h>
#include <linux/rtnetlink.h>
#include <net/cfg802154.h>
#include "core.h"
#include "sysfs.h"
#include "rdev-ops.h"
static inline struct cfg802154_registered_device *
dev_to_rdev(struct device *dev)
{ … }
#define SHOW_FMT(name, fmt, member) …
SHOW_FMT(…) …;
static ssize_t name_show(struct device *dev,
struct device_attribute *attr,
char *buf)
{ … }
static DEVICE_ATTR_RO(name);
static void wpan_phy_release(struct device *dev)
{ … }
static struct attribute *pmib_attrs[] = …;
ATTRIBUTE_GROUPS(…);
#ifdef CONFIG_PM_SLEEP
static int wpan_phy_suspend(struct device *dev)
{ … }
static int wpan_phy_resume(struct device *dev)
{ … }
static SIMPLE_DEV_PM_OPS(wpan_phy_pm_ops, wpan_phy_suspend, wpan_phy_resume);
#define WPAN_PHY_PM_OPS …
#else
#define WPAN_PHY_PM_OPS …
#endif
const struct class wpan_phy_class = …;
int wpan_phy_sysfs_init(void)
{ … }
void wpan_phy_sysfs_exit(void)
{ … }