mirror of
https://github.com/hardkernel/linux.git
synced 2026-03-25 12:00:22 +09:00
Revert "device property: Allow const parameter to dev_fwnode()"
This reverts commit339add0430which is commitb295d484b9upstream. It makes dev_fwnode() an inline function, when the Android abi seems to want it around because so many external modules rely on it. So revert this change for now. If it's needed in the future, it can come back in an abi-safe way. Bug: 161946584 Change-Id: I498bedf1e6e30477b25efa9577dcaf79e091b3e9 Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
This commit is contained in:
@@ -18,19 +18,12 @@
|
||||
#include <linux/etherdevice.h>
|
||||
#include <linux/phy.h>
|
||||
|
||||
struct fwnode_handle *__dev_fwnode(struct device *dev)
|
||||
struct fwnode_handle *dev_fwnode(const struct device *dev)
|
||||
{
|
||||
return IS_ENABLED(CONFIG_OF) && dev->of_node ?
|
||||
of_fwnode_handle(dev->of_node) : dev->fwnode;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(__dev_fwnode);
|
||||
|
||||
const struct fwnode_handle *__dev_fwnode_const(const struct device *dev)
|
||||
{
|
||||
return IS_ENABLED(CONFIG_OF) && dev->of_node ?
|
||||
of_fwnode_handle(dev->of_node) : dev->fwnode;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(__dev_fwnode_const);
|
||||
EXPORT_SYMBOL_GPL(dev_fwnode);
|
||||
|
||||
/**
|
||||
* device_property_present - check if a property of a device is present
|
||||
|
||||
@@ -31,12 +31,7 @@ enum dev_dma_attr {
|
||||
DEV_DMA_COHERENT,
|
||||
};
|
||||
|
||||
const struct fwnode_handle *__dev_fwnode_const(const struct device *dev);
|
||||
struct fwnode_handle *__dev_fwnode(struct device *dev);
|
||||
#define dev_fwnode(dev) \
|
||||
_Generic((dev), \
|
||||
const struct device *: __dev_fwnode_const, \
|
||||
struct device *: __dev_fwnode)(dev)
|
||||
struct fwnode_handle *dev_fwnode(const struct device *dev);
|
||||
|
||||
bool device_property_present(struct device *dev, const char *propname);
|
||||
int device_property_read_u8_array(struct device *dev, const char *propname,
|
||||
|
||||
Reference in New Issue
Block a user