Revert "device property: Add const qualifier to device_get_match_data() parameter"

This reverts commit 167e4371ef which is
commit aade55c86033bee868a93e4bf3843c9c99e84526 upstream.

It breaks the Android kernel abi and can be brought back in the future
in an abi-safe way if it is really needed.

Bug: 161946584
Change-Id: Ibe2a0a95fe742a59be4c97fab2bdf3833cdb64f0
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
This commit is contained in:
Greg Kroah-Hartman 2024-11-10 08:15:46 +00:00
parent 47d930c2c7
commit da5751e56b
2 changed files with 4 additions and 4 deletions

View File

@ -18,7 +18,7 @@
#include <linux/etherdevice.h>
#include <linux/phy.h>
struct fwnode_handle *dev_fwnode(const struct device *dev)
struct fwnode_handle *dev_fwnode(struct device *dev)
{
return IS_ENABLED(CONFIG_OF) && dev->of_node ?
&dev->of_node->fwnode : dev->fwnode;
@ -1231,7 +1231,7 @@ int fwnode_graph_parse_endpoint(const struct fwnode_handle *fwnode,
}
EXPORT_SYMBOL(fwnode_graph_parse_endpoint);
const void *device_get_match_data(const struct device *dev)
const void *device_get_match_data(struct device *dev)
{
return fwnode_call_ptr_op(dev_fwnode(dev), device_get_match_data, dev);
}

View File

@ -31,7 +31,7 @@ enum dev_dma_attr {
DEV_DMA_COHERENT,
};
struct fwnode_handle *dev_fwnode(const struct device *dev);
struct fwnode_handle *dev_fwnode(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,
@ -382,7 +382,7 @@ bool device_dma_supported(struct device *dev);
enum dev_dma_attr device_get_dma_attr(struct device *dev);
const void *device_get_match_data(const struct device *dev);
const void *device_get_match_data(struct device *dev);
int device_get_phy_mode(struct device *dev);