Skip to content
Commit 63a13079 authored by Cesar Eduardo Barros's avatar Cesar Eduardo Barros Committed by Felipe Balbi
Browse files

usb: phy: mv-otg: use to_delayed_work instead of cast



Directly casting a work_struct pointer to a delayed_work is risky if the
work member of struct delayed_work is ever moved from being the first
member.

Instead, use the inline function to_delayed_work(), which does the same
cast in a safer way (using container_of).

Signed-off-by: default avatarCesar Eduardo Barros <cesarb@cesarb.net>
Signed-off-by: default avatarFelipe Balbi <balbi@ti.com>
parent b2e587db
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment