author | Suman Anna <s-anna@ti.com> | |
Tue, 30 Oct 2018 18:06:34 +0000 (13:06 -0500) | ||
committer | Suman Anna <s-anna@ti.com> | |
Mon, 13 Jan 2020 19:05:31 +0000 (13:05 -0600) | ||
commit | ca33723770ce528003cfc7712f4999853c683000 | |
tree | 70041d0ea44ebc79b8f585c295314399a0bc09db | tree | snapshot (tar.xz tar.gz zip) |
parent | 16fc299fb82b4a996edb38a4bf9102fc3dffce1b | commit | diff |
remoteproc: use a local copy for the name field
The current name field used in the remoteproc structure is simply
a pointer to a name field supplied during the rproc_alloc() call.
The pointer passed in by remoteproc drivers during registration is
typically a dev_name pointer, but it is possible that the pointer
will no longer remain valid if the devices themselves were created
at runtime like in the case of of_platform_populate(), and were
deleted upon any failures within the respective remoteproc driver
probe function.
So, allocate and maintain a local copy for this name field to
keep it agnostic of the logic used in the remoteproc drivers.
Signed-off-by: Suman Anna <s-anna@ti.com>
The current name field used in the remoteproc structure is simply
a pointer to a name field supplied during the rproc_alloc() call.
The pointer passed in by remoteproc drivers during registration is
typically a dev_name pointer, but it is possible that the pointer
will no longer remain valid if the devices themselves were created
at runtime like in the case of of_platform_populate(), and were
deleted upon any failures within the respective remoteproc driver
probe function.
So, allocate and maintain a local copy for this name field to
keep it agnostic of the logic used in the remoteproc drivers.
Signed-off-by: Suman Anna <s-anna@ti.com>
drivers/remoteproc/remoteproc_core.c | diff | blob | history | |
include/linux/remoteproc.h | diff | blob | history |