Skip to content

Commit d4f1d01

Browse files
Yang Yingliangtmlind
authored andcommitted
bus: ti-sysc: Use list_for_each_entry() helper
Convert list_for_each() to list_for_each_entry() where applicable. Signed-off-by: Yang Yingliang <yangyingliang@huawei.com> Message-Id: <20220827094604.3325887-1-yangyingliang@huawei.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
1 parent 2ee1bdd commit d4f1d01

1 file changed

Lines changed: 2 additions & 6 deletions

File tree

drivers/bus/ti-sysc.c

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2507,11 +2507,9 @@ static struct dev_pm_domain sysc_child_pm_domain = {
25072507
static void sysc_reinit_modules(struct sysc_soc_info *soc)
25082508
{
25092509
struct sysc_module *module;
2510-
struct list_head *pos;
25112510
struct sysc *ddata;
25122511

2513-
list_for_each(pos, &sysc_soc->restored_modules) {
2514-
module = list_entry(pos, struct sysc_module, node);
2512+
list_for_each_entry(module, &sysc_soc->restored_modules, node) {
25152513
ddata = module->ddata;
25162514
sysc_reinit_module(ddata, ddata->enabled);
25172515
}
@@ -3191,12 +3189,10 @@ static void sysc_cleanup_static_data(void)
31913189
static int sysc_check_disabled_devices(struct sysc *ddata)
31923190
{
31933191
struct sysc_address *disabled_module;
3194-
struct list_head *pos;
31953192
int error = 0;
31963193

31973194
mutex_lock(&sysc_soc->list_lock);
3198-
list_for_each(pos, &sysc_soc->disabled_modules) {
3199-
disabled_module = list_entry(pos, struct sysc_address, node);
3195+
list_for_each_entry(disabled_module, &sysc_soc->disabled_modules, node) {
32003196
if (ddata->module_pa == disabled_module->base) {
32013197
dev_dbg(ddata->dev, "module disabled for this SoC\n");
32023198
error = -ENODEV;

0 commit comments

Comments
 (0)