Loading drivers/soc/qcom/subsystem_restart.c +11 −10 Original line number Diff line number Diff line /* Copyright (c) 2011-2017, The Linux Foundation. All rights reserved. /* Copyright (c) 2011-2018, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and Loading Loading @@ -707,14 +707,14 @@ static int subsystem_powerup(struct subsys_device *dev, void *data) return 0; } static int __find_subsys(struct device *dev, void *data) static int __find_subsys_device(struct device *dev, void *data) { struct subsys_device *subsys = to_subsys(dev); return !strcmp(subsys->desc->name, data); } static struct subsys_device *find_subsys(const char *str) struct subsys_device *find_subsys_device(const char *str) { struct device *dev; Loading @@ -722,9 +722,10 @@ static struct subsys_device *find_subsys(const char *str) return NULL; dev = bus_find_device(&subsys_bus_type, NULL, (void *)str, __find_subsys); __find_subsys_device); return dev ? to_subsys(dev) : NULL; } EXPORT_SYMBOL(find_subsys_device); static int subsys_start(struct subsys_device *subsys) { Loading Loading @@ -796,7 +797,7 @@ int subsystem_set_fwname(const char *name, const char *fw_name) if (!fw_name) return -EINVAL; subsys = find_subsys(name); subsys = find_subsys_device(name); if (!subsys) return -EINVAL; Loading @@ -816,7 +817,7 @@ int wait_for_shutdown_ack(struct subsys_desc *desc) if (!desc || !desc->shutdown_ack_irq) return 0; dev = find_subsys(desc->name); dev = find_subsys_device(desc->name); if (!dev) return 0; Loading @@ -842,7 +843,7 @@ void *__subsystem_get(const char *name, const char *fw_name) if (!name) return NULL; subsys = retval = find_subsys(name); subsys = retval = find_subsys_device(name); if (!subsys) return ERR_PTR(-ENODEV); if (!try_module_get(subsys->owner)) { Loading Loading @@ -942,7 +943,7 @@ void subsystem_put(void *subsystem) } mutex_unlock(&track->lock); subsys_d = find_subsys(subsys->desc->depends_on); subsys_d = find_subsys_device(subsys->desc->depends_on); if (subsys_d) { subsystem_put(subsys_d); put_device(&subsys_d->dev); Loading Loading @@ -1156,7 +1157,7 @@ EXPORT_SYMBOL(subsystem_restart_dev); int subsystem_restart(const char *name) { int ret; struct subsys_device *dev = find_subsys(name); struct subsys_device *dev = find_subsys_device(name); if (!dev) return -ENODEV; Loading @@ -1169,7 +1170,7 @@ EXPORT_SYMBOL(subsystem_restart); int subsystem_crashed(const char *name) { struct subsys_device *dev = find_subsys(name); struct subsys_device *dev = find_subsys_device(name); struct subsys_tracking *track; if (!dev) Loading include/soc/qcom/subsystem_restart.h +2 −1 Original line number Diff line number Diff line /* Copyright (c) 2014-2017, The Linux Foundation. All rights reserved. /* Copyright (c) 2014-2018, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and Loading Loading @@ -140,6 +140,7 @@ void notify_proxy_vote(struct device *device); void notify_proxy_unvote(struct device *device); void complete_err_ready(struct subsys_device *subsys); void complete_shutdown_ack(struct subsys_device *subsys); struct subsys_device *find_subsys_device(const char *str); extern int wait_for_shutdown_ack(struct subsys_desc *desc); #else Loading Loading
drivers/soc/qcom/subsystem_restart.c +11 −10 Original line number Diff line number Diff line /* Copyright (c) 2011-2017, The Linux Foundation. All rights reserved. /* Copyright (c) 2011-2018, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and Loading Loading @@ -707,14 +707,14 @@ static int subsystem_powerup(struct subsys_device *dev, void *data) return 0; } static int __find_subsys(struct device *dev, void *data) static int __find_subsys_device(struct device *dev, void *data) { struct subsys_device *subsys = to_subsys(dev); return !strcmp(subsys->desc->name, data); } static struct subsys_device *find_subsys(const char *str) struct subsys_device *find_subsys_device(const char *str) { struct device *dev; Loading @@ -722,9 +722,10 @@ static struct subsys_device *find_subsys(const char *str) return NULL; dev = bus_find_device(&subsys_bus_type, NULL, (void *)str, __find_subsys); __find_subsys_device); return dev ? to_subsys(dev) : NULL; } EXPORT_SYMBOL(find_subsys_device); static int subsys_start(struct subsys_device *subsys) { Loading Loading @@ -796,7 +797,7 @@ int subsystem_set_fwname(const char *name, const char *fw_name) if (!fw_name) return -EINVAL; subsys = find_subsys(name); subsys = find_subsys_device(name); if (!subsys) return -EINVAL; Loading @@ -816,7 +817,7 @@ int wait_for_shutdown_ack(struct subsys_desc *desc) if (!desc || !desc->shutdown_ack_irq) return 0; dev = find_subsys(desc->name); dev = find_subsys_device(desc->name); if (!dev) return 0; Loading @@ -842,7 +843,7 @@ void *__subsystem_get(const char *name, const char *fw_name) if (!name) return NULL; subsys = retval = find_subsys(name); subsys = retval = find_subsys_device(name); if (!subsys) return ERR_PTR(-ENODEV); if (!try_module_get(subsys->owner)) { Loading Loading @@ -942,7 +943,7 @@ void subsystem_put(void *subsystem) } mutex_unlock(&track->lock); subsys_d = find_subsys(subsys->desc->depends_on); subsys_d = find_subsys_device(subsys->desc->depends_on); if (subsys_d) { subsystem_put(subsys_d); put_device(&subsys_d->dev); Loading Loading @@ -1156,7 +1157,7 @@ EXPORT_SYMBOL(subsystem_restart_dev); int subsystem_restart(const char *name) { int ret; struct subsys_device *dev = find_subsys(name); struct subsys_device *dev = find_subsys_device(name); if (!dev) return -ENODEV; Loading @@ -1169,7 +1170,7 @@ EXPORT_SYMBOL(subsystem_restart); int subsystem_crashed(const char *name) { struct subsys_device *dev = find_subsys(name); struct subsys_device *dev = find_subsys_device(name); struct subsys_tracking *track; if (!dev) Loading
include/soc/qcom/subsystem_restart.h +2 −1 Original line number Diff line number Diff line /* Copyright (c) 2014-2017, The Linux Foundation. All rights reserved. /* Copyright (c) 2014-2018, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and Loading Loading @@ -140,6 +140,7 @@ void notify_proxy_vote(struct device *device); void notify_proxy_unvote(struct device *device); void complete_err_ready(struct subsys_device *subsys); void complete_shutdown_ack(struct subsys_device *subsys); struct subsys_device *find_subsys_device(const char *str); extern int wait_for_shutdown_ack(struct subsys_desc *desc); #else Loading