@@ -913,11 +913,11 @@ static void _remove_opp_dev(struct opp_device *opp_dev,
opp_debug_unregister(opp_dev, opp_table);
list_del(&opp_dev->node);
kfree(opp_dev);
}
-static struct opp_device *_add_opp_dev_unlocked(const struct device *dev,
+static struct opp_device *_add_opp_dev_unlocked(struct device *dev,
struct opp_table *opp_table)
{
struct opp_device *opp_dev;
opp_dev = kzalloc(sizeof(*opp_dev), GFP_KERNEL);
@@ -933,11 +933,11 @@ static struct opp_device *_add_opp_dev_unlocked(const struct device *dev,
opp_debug_register(opp_dev, opp_table);
return opp_dev;
}
-struct opp_device *_add_opp_dev(const struct device *dev,
+struct opp_device *_add_opp_dev(struct device *dev,
struct opp_table *opp_table)
{
struct opp_device *opp_dev;
mutex_lock(&opp_table->lock);
@@ -103,11 +103,11 @@ struct dev_pm_opp {
* This is an internal data structure maintaining the devices that are managed
* by 'struct opp_table'.
*/
struct opp_device {
struct list_head node;
- const struct device *dev;
+ struct device *dev;
#ifdef CONFIG_DEBUG_FS
struct dentry *dentry;
#endif
};
@@ -207,11 +207,11 @@ struct opp_table {
void dev_pm_opp_get(struct dev_pm_opp *opp);
void _opp_remove_all_static(struct opp_table *opp_table);
void _get_opp_table_kref(struct opp_table *opp_table);
int _get_opp_count(struct opp_table *opp_table);
struct opp_table *_find_opp_table(struct device *dev);
-struct opp_device *_add_opp_dev(const struct device *dev, struct opp_table *opp_table);
+struct opp_device *_add_opp_dev(struct device *dev, struct opp_table *opp_table);
void _dev_pm_opp_find_and_remove_table(struct device *dev);
struct dev_pm_opp *_opp_allocate(struct opp_table *opp_table);
void _opp_free(struct dev_pm_opp *opp);
int _opp_add(struct device *dev, struct dev_pm_opp *new_opp, struct opp_table *opp_table, bool rate_not_available);
int _opp_add_v1(struct opp_table *opp_table, struct device *dev, unsigned long freq, long u_volt, bool dynamic);
This is required for fetching struct device from struct opp_table with casts Signed-off-by: Leonard Crestez <leonard.crestez@nxp.com> --- Does "const" here have any particular significance? drivers/opp/core.c | 4 ++-- drivers/opp/opp.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-)