ANDROID: virt: gunyah: Sync with latest platform ops
Const-ify the gh_rm_platform_ops. Syncs with the latest version of the platform ops: https://lore.kernel.org/all/20230613172054.3959700-15-quic_eberman@quicinc.com/ INFO: function symbol changed from 'int devm_gh_rm_register_platform_ops(struct device*, struct gh_rm_platform_ops*)' to 'int devm_gh_rm_register_platform_ops(struct device*, const struct gh_rm_platform_ops*)' CRC changed from 0xc4b20ef4 to 0x7fe0042f type changed from 'int(struct device*, struct gh_rm_platform_ops*)' to 'int(struct device*, const struct gh_rm_platform_ops*)' parameter 2 type changed from 'struct gh_rm_platform_ops*' to 'const struct gh_rm_platform_ops*' pointed-to type changed from 'struct gh_rm_platform_ops' to 'const struct gh_rm_platform_ops' qualifier const added function symbol changed from 'int gh_rm_register_platform_ops(struct gh_rm_platform_ops*)' to 'int gh_rm_register_platform_ops(const struct gh_rm_platform_ops*)' CRC changed from 0xc34a7803 to 0xfd11885c type changed from 'int(struct gh_rm_platform_ops*)' to 'int(const struct gh_rm_platform_ops*)' parameter 1 type changed from 'struct gh_rm_platform_ops*' to 'const struct gh_rm_platform_ops*' pointed-to type changed from 'struct gh_rm_platform_ops' to 'const struct gh_rm_platform_ops' qualifier const added function symbol changed from 'void gh_rm_unregister_platform_ops(struct gh_rm_platform_ops*)' to 'void gh_rm_unregister_platform_ops(const struct gh_rm_platform_ops*)' CRC changed from 0xc1f09d18 to 0x57f483b type changed from 'void(struct gh_rm_platform_ops*)' to 'void(const struct gh_rm_platform_ops*)' parameter 1 type changed from 'struct gh_rm_platform_ops*' to 'const struct gh_rm_platform_ops*' pointed-to type changed from 'struct gh_rm_platform_ops' to 'const struct gh_rm_platform_ops' qualifier const added Bug: 287037804 Change-Id: Iff37610b721c344ac8c6b1737830f6d1e8674d34 Signed-off-by: Elliot Berman <quic_eberman@quicinc.com>
This commit is contained in:
parent
69a3ec73e4
commit
fcc32be061
@ -9,7 +9,7 @@
|
|||||||
|
|
||||||
#include "rsc_mgr.h"
|
#include "rsc_mgr.h"
|
||||||
|
|
||||||
static struct gh_rm_platform_ops *rm_platform_ops;
|
static const struct gh_rm_platform_ops *rm_platform_ops;
|
||||||
static DECLARE_RWSEM(rm_platform_ops_lock);
|
static DECLARE_RWSEM(rm_platform_ops_lock);
|
||||||
|
|
||||||
int gh_rm_platform_pre_mem_share(struct gh_rm *rm, struct gh_rm_mem_parcel *mem_parcel)
|
int gh_rm_platform_pre_mem_share(struct gh_rm *rm, struct gh_rm_mem_parcel *mem_parcel)
|
||||||
@ -36,7 +36,7 @@ int gh_rm_platform_post_mem_reclaim(struct gh_rm *rm, struct gh_rm_mem_parcel *m
|
|||||||
}
|
}
|
||||||
EXPORT_SYMBOL_GPL(gh_rm_platform_post_mem_reclaim);
|
EXPORT_SYMBOL_GPL(gh_rm_platform_post_mem_reclaim);
|
||||||
|
|
||||||
int gh_rm_register_platform_ops(struct gh_rm_platform_ops *platform_ops)
|
int gh_rm_register_platform_ops(const struct gh_rm_platform_ops *platform_ops)
|
||||||
{
|
{
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
|
|
||||||
@ -50,7 +50,7 @@ int gh_rm_register_platform_ops(struct gh_rm_platform_ops *platform_ops)
|
|||||||
}
|
}
|
||||||
EXPORT_SYMBOL_GPL(gh_rm_register_platform_ops);
|
EXPORT_SYMBOL_GPL(gh_rm_register_platform_ops);
|
||||||
|
|
||||||
void gh_rm_unregister_platform_ops(struct gh_rm_platform_ops *platform_ops)
|
void gh_rm_unregister_platform_ops(const struct gh_rm_platform_ops *platform_ops)
|
||||||
{
|
{
|
||||||
down_write(&rm_platform_ops_lock);
|
down_write(&rm_platform_ops_lock);
|
||||||
if (rm_platform_ops == platform_ops)
|
if (rm_platform_ops == platform_ops)
|
||||||
@ -61,10 +61,10 @@ EXPORT_SYMBOL_GPL(gh_rm_unregister_platform_ops);
|
|||||||
|
|
||||||
static void _devm_gh_rm_unregister_platform_ops(void *data)
|
static void _devm_gh_rm_unregister_platform_ops(void *data)
|
||||||
{
|
{
|
||||||
gh_rm_unregister_platform_ops(data);
|
gh_rm_unregister_platform_ops((const struct gh_rm_platform_ops *)data);
|
||||||
}
|
}
|
||||||
|
|
||||||
int devm_gh_rm_register_platform_ops(struct device *dev, struct gh_rm_platform_ops *ops)
|
int devm_gh_rm_register_platform_ops(struct device *dev, const struct gh_rm_platform_ops *ops)
|
||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
@ -72,7 +72,7 @@ int devm_gh_rm_register_platform_ops(struct device *dev, struct gh_rm_platform_o
|
|||||||
if (ret)
|
if (ret)
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
return devm_add_action(dev, _devm_gh_rm_unregister_platform_ops, ops);
|
return devm_add_action(dev, _devm_gh_rm_unregister_platform_ops, (void *)ops);
|
||||||
}
|
}
|
||||||
EXPORT_SYMBOL_GPL(devm_gh_rm_register_platform_ops);
|
EXPORT_SYMBOL_GPL(devm_gh_rm_register_platform_ops);
|
||||||
|
|
||||||
|
@ -167,15 +167,15 @@ struct gh_rm_platform_ops {
|
|||||||
};
|
};
|
||||||
|
|
||||||
#if IS_ENABLED(CONFIG_GUNYAH_PLATFORM_HOOKS)
|
#if IS_ENABLED(CONFIG_GUNYAH_PLATFORM_HOOKS)
|
||||||
int gh_rm_register_platform_ops(struct gh_rm_platform_ops *platform_ops);
|
int gh_rm_register_platform_ops(const struct gh_rm_platform_ops *platform_ops);
|
||||||
void gh_rm_unregister_platform_ops(struct gh_rm_platform_ops *platform_ops);
|
void gh_rm_unregister_platform_ops(const struct gh_rm_platform_ops *platform_ops);
|
||||||
int devm_gh_rm_register_platform_ops(struct device *dev, struct gh_rm_platform_ops *ops);
|
int devm_gh_rm_register_platform_ops(struct device *dev, const struct gh_rm_platform_ops *ops);
|
||||||
#else
|
#else
|
||||||
static inline int gh_rm_register_platform_ops(struct gh_rm_platform_ops *platform_ops)
|
static inline int gh_rm_register_platform_ops(const struct gh_rm_platform_ops *platform_ops)
|
||||||
{ return 0; }
|
{ return 0; }
|
||||||
static inline void gh_rm_unregister_platform_ops(struct gh_rm_platform_ops *platform_ops) { }
|
static inline void gh_rm_unregister_platform_ops(const struct gh_rm_platform_ops *platform_ops) { }
|
||||||
static inline int devm_gh_rm_register_platform_ops(struct device *dev,
|
static inline int devm_gh_rm_register_platform_ops(struct device *dev,
|
||||||
struct gh_rm_platform_ops *ops) { return 0; }
|
const struct gh_rm_platform_ops *ops) { return 0; }
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user