Remove multiple definitions of the to_dev() macro
Subsystems (5)
PATCH 1/1 Remove multiple definitions of the to_dev() macro
Remove multiple definitions of the to_dev() macro
Signed-off-by Denis Kirjanov <[email protected]>
---
drivers/base/core.c +0 -1
@@ -62,7 +62,6 @@ const char *dev_driver_string(const struct device *dev) }EXPORT_SYMBOL (dev_driver_string); -#define to_dev (obj) container_of(obj, struct device, kobj)#define to_dev_attr (_attr) container_of(_attr, struct device_attribute, attr) static ssize_t dev_attr_show(struct kobject *kobj, struct attribute *attr,
drivers/base/firmware_class.c +0 -2
@@ -21,8 +21,6 @@#include <linux/firmware.h> #include "base.h" -#define to_dev (obj) container_of(obj, struct device, kobj) -MODULE_AUTHOR ("Manuel Estrada Sainz" );MODULE_DESCRIPTION ("Multi purpose firmware loading support" );MODULE_LICENSE ("GPL" );
drivers/net/bonding/bond_sysfs.c +0 -1
@@ -38,7 +38,6 @@#include "bonding.h" -#define to_dev (obj) container_of(obj, struct device, kobj)#define to_bond (cd) ((struct bonding *)(netdev_priv(to_net_dev(cd))))/*
include/linux/device.h +1 -0
@@ -364,6 +364,7 @@ struct device_dma_parameters {unsigned long segment_boundary_mask; }; +#define to_dev (obj) container_of(obj, struct device, kobj)struct device {struct device *parent;
net/bridge/br_sysfs_br.c +1 -1
@@ -18,10 +18,10 @@#include <linux/rtnetlink.h> #include <linux/spinlock.h> #include <linux/times.h> +#include <linux/device.h> #include "br_private.h" -#define to_dev (obj) container_of(obj, struct device, kobj)#define to_bridge (cd) ((struct net_bridge *)netdev_priv(to_net_dev(cd)))/*