We already has the interface kobj_to_dev(), which can be used to get
'struct device *' from kobj, so use it.
Signed-off-by: Xianting Tian
---
drivers/nvme/host/core.c | 4 ++--
drivers/nvme/host/lightnvm.c | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git
On 9/4/20 9:01 AM, Xianting Tian wrote:
> We already has the interface kobj_to_dev(), which can be used to get
> 'struct device *' from kobj, so use it.
Let's please not, this is immediately obvious what it does:
struct device *dev = container_of(kobj, struct device, kobj);
while this one is
2 matches
Mail list logo