Skip to content

Commit 5879656

Browse files
Sakari Ailusgregkh
authored andcommitted
mei: Remove redundant pm_runtime_mark_last_busy() calls
pm_runtime_put_autosuspend(), pm_runtime_put_sync_autosuspend(), pm_runtime_autosuspend() and pm_request_autosuspend() now include a call to pm_runtime_mark_last_busy(). Remove the now-reduntant explicit call to pm_runtime_mark_last_busy(). Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Acked-by: Alexander Usyskin <alexander.usyskin@intel.com> Link: https://patch.msgid.link/20251027114118.390775-1-sakari.ailus@linux.intel.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 2c8ad5c commit 5879656

2 files changed

Lines changed: 2 additions & 14 deletions

File tree

drivers/misc/mei/client.c

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -709,7 +709,6 @@ void mei_host_client_init(struct mei_device *dev)
709709

710710
schedule_work(&dev->bus_rescan_work);
711711

712-
pm_runtime_mark_last_busy(dev->parent);
713712
dev_dbg(&dev->dev, "rpm: autosuspend\n");
714713
pm_request_autosuspend(dev->parent);
715714
}
@@ -991,7 +990,6 @@ int mei_cl_disconnect(struct mei_cl *cl)
991990
rets = __mei_cl_disconnect(cl);
992991

993992
cl_dbg(dev, cl, "rpm: autosuspend\n");
994-
pm_runtime_mark_last_busy(dev->parent);
995993
pm_runtime_put_autosuspend(dev->parent);
996994

997995
return rets;
@@ -1167,7 +1165,6 @@ int mei_cl_connect(struct mei_cl *cl, struct mei_me_client *me_cl,
11671165
rets = cl->status;
11681166
out:
11691167
cl_dbg(dev, cl, "rpm: autosuspend\n");
1170-
pm_runtime_mark_last_busy(dev->parent);
11711168
pm_runtime_put_autosuspend(dev->parent);
11721169

11731170
mei_io_cb_free(cb);
@@ -1554,7 +1551,6 @@ int mei_cl_notify_request(struct mei_cl *cl,
15541551

15551552
out:
15561553
cl_dbg(dev, cl, "rpm: autosuspend\n");
1557-
pm_runtime_mark_last_busy(dev->parent);
15581554
pm_runtime_put_autosuspend(dev->parent);
15591555

15601556
mei_io_cb_free(cb);
@@ -1702,7 +1698,6 @@ int mei_cl_read_start(struct mei_cl *cl, size_t length, const struct file *fp)
17021698

17031699
out:
17041700
cl_dbg(dev, cl, "rpm: autosuspend\n");
1705-
pm_runtime_mark_last_busy(dev->parent);
17061701
pm_runtime_put_autosuspend(dev->parent);
17071702
nortpm:
17081703
if (rets)
@@ -2092,7 +2087,6 @@ ssize_t mei_cl_write(struct mei_cl *cl, struct mei_cl_cb *cb, unsigned long time
20922087
rets = buf_len;
20932088
err:
20942089
cl_dbg(dev, cl, "rpm: autosuspend\n");
2095-
pm_runtime_mark_last_busy(dev->parent);
20962090
pm_runtime_put_autosuspend(dev->parent);
20972091
free:
20982092
mei_io_cb_free(cb);
@@ -2116,12 +2110,10 @@ void mei_cl_complete(struct mei_cl *cl, struct mei_cl_cb *cb)
21162110
case MEI_FOP_WRITE:
21172111
mei_tx_cb_dequeue(cb);
21182112
cl->writing_state = MEI_WRITE_COMPLETE;
2119-
if (waitqueue_active(&cl->tx_wait)) {
2113+
if (waitqueue_active(&cl->tx_wait))
21202114
wake_up_interruptible(&cl->tx_wait);
2121-
} else {
2122-
pm_runtime_mark_last_busy(dev->parent);
2115+
else
21232116
pm_request_autosuspend(dev->parent);
2124-
}
21252117
break;
21262118

21272119
case MEI_FOP_READ:
@@ -2366,7 +2358,6 @@ int mei_cl_dma_alloc_and_map(struct mei_cl *cl, const struct file *fp,
23662358
mei_cl_dma_free(cl);
23672359

23682360
cl_dbg(dev, cl, "rpm: autosuspend\n");
2369-
pm_runtime_mark_last_busy(dev->parent);
23702361
pm_runtime_put_autosuspend(dev->parent);
23712362

23722363
mei_io_cb_free(cb);
@@ -2444,7 +2435,6 @@ int mei_cl_dma_unmap(struct mei_cl *cl, const struct file *fp)
24442435
mei_cl_dma_free(cl);
24452436
out:
24462437
cl_dbg(dev, cl, "rpm: autosuspend\n");
2447-
pm_runtime_mark_last_busy(dev->parent);
24482438
pm_runtime_put_autosuspend(dev->parent);
24492439

24502440
mei_io_cb_free(cb);

drivers/misc/mei/interrupt.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,6 @@ static int mei_cl_irq_read_msg(struct mei_cl *cl,
229229
cl_dbg(dev, cl, "completed read length = %zu\n", cb->buf_idx);
230230
list_move_tail(&cb->list, cmpl_list);
231231
} else {
232-
pm_runtime_mark_last_busy(dev->parent);
233232
pm_request_autosuspend(dev->parent);
234233
}
235234

@@ -310,7 +309,6 @@ static int mei_cl_irq_read(struct mei_cl *cl, struct mei_cl_cb *cb,
310309
return ret;
311310
}
312311

313-
pm_runtime_mark_last_busy(dev->parent);
314312
pm_request_autosuspend(dev->parent);
315313

316314
list_move_tail(&cb->list, &cl->rd_pending);

0 commit comments

Comments
 (0)