driver core: Replace the dangerous to_root_device macro with an inline function
The original macro worked only when applied to variables named 'dev'. While this could have been fixed by simply renaming the macro argument, a more type-safe replacement by an inline function is preferred. Signed-off-by: NFerenc Wagner <wferi@niif.hu> Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
Showing
想要评论请 注册 或 登录