]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commit
lightnvm: allow targets to use sysfs
authorJavier González <jg@lightnvm.io>
Tue, 31 Jan 2017 12:17:20 +0000 (13:17 +0100)
committerJens Axboe <axboe@fb.com>
Tue, 31 Jan 2017 15:32:13 +0000 (08:32 -0700)
commit9a69b0ed6257ae5e71c99bf21ce53f98c558476a
tree8f414b478b2a105851af285af7f2861e1a77aa24
parentdeccf5a52ea59843f5575cb49fe532c7cb8801e4
lightnvm: allow targets to use sysfs

In order to register through the sysfs interface, a driver needs to know
its kobject. On a disk structure, this happens when the partition
information is added (device_add_disk), which for lightnvm takes place
after the target has been initialized. This means that on target
initialization, the kboject has not been created yet.

This patch adds a target function to let targets initialize their own
kboject as a child of the disk kobject.

Signed-off-by: Javier González <javier@cnexlabs.com>
Added exit typedef and passed gendisk instead of void pointer for exit.
Signed-off-by: Matias Bjørling <matias@cnexlabs.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
drivers/lightnvm/core.c
include/linux/lightnvm.h