Loading drivers/soc/qcom/subsystem_restart.c +22 −0 Original line number Diff line number Diff line Loading @@ -746,6 +746,28 @@ static void subsys_stop(struct subsys_device *subsys) notify_each_subsys_device(&subsys, 1, SUBSYS_AFTER_SHUTDOWN, NULL); } int subsystem_set_fwname(const char *name, const char *fw_name) { struct subsys_device *subsys; if (!name) return -EINVAL; if (!fw_name) return -EINVAL; subsys = find_subsys(name); if (!subsys) return -EINVAL; pr_debug("Changing subsys [%s] fw_name to [%s]\n", name, fw_name); strlcpy(subsys->desc->fw_name, fw_name, sizeof(subsys->desc->fw_name)); return 0; } EXPORT_SYMBOL(subsystem_set_fwname); void *__subsystem_get(const char *name, const char *fw_name) { struct subsys_device *subsys; Loading include/soc/qcom/subsystem_restart.h +6 −0 Original line number Diff line number Diff line Loading @@ -113,6 +113,7 @@ extern int subsystem_crashed(const char *name); extern void *subsystem_get(const char *name); extern void *subsystem_get_with_fwname(const char *name, const char *fw_name); extern int subsystem_set_fwname(const char *name, const char *fw_name); extern void subsystem_put(void *subsystem); extern struct subsys_device *subsys_register(struct subsys_desc *desc); Loading Loading @@ -157,6 +158,11 @@ static inline void *subsystem_get_with_fwname(const char *name, return NULL; } static inline int subsystem_set_fwname(const char *name, const char *fw_name) { return 0; } static inline void subsystem_put(void *subsystem) { } static inline Loading Loading
drivers/soc/qcom/subsystem_restart.c +22 −0 Original line number Diff line number Diff line Loading @@ -746,6 +746,28 @@ static void subsys_stop(struct subsys_device *subsys) notify_each_subsys_device(&subsys, 1, SUBSYS_AFTER_SHUTDOWN, NULL); } int subsystem_set_fwname(const char *name, const char *fw_name) { struct subsys_device *subsys; if (!name) return -EINVAL; if (!fw_name) return -EINVAL; subsys = find_subsys(name); if (!subsys) return -EINVAL; pr_debug("Changing subsys [%s] fw_name to [%s]\n", name, fw_name); strlcpy(subsys->desc->fw_name, fw_name, sizeof(subsys->desc->fw_name)); return 0; } EXPORT_SYMBOL(subsystem_set_fwname); void *__subsystem_get(const char *name, const char *fw_name) { struct subsys_device *subsys; Loading
include/soc/qcom/subsystem_restart.h +6 −0 Original line number Diff line number Diff line Loading @@ -113,6 +113,7 @@ extern int subsystem_crashed(const char *name); extern void *subsystem_get(const char *name); extern void *subsystem_get_with_fwname(const char *name, const char *fw_name); extern int subsystem_set_fwname(const char *name, const char *fw_name); extern void subsystem_put(void *subsystem); extern struct subsys_device *subsys_register(struct subsys_desc *desc); Loading Loading @@ -157,6 +158,11 @@ static inline void *subsystem_get_with_fwname(const char *name, return NULL; } static inline int subsystem_set_fwname(const char *name, const char *fw_name) { return 0; } static inline void subsystem_put(void *subsystem) { } static inline Loading