tee: replace cdev_add + device_add with cdev_device_add
authorSudeep Holla <sudeep.holla@arm.com>
Tue, 1 Sep 2020 10:33:34 +0000 (11:33 +0100)
committerJens Wiklander <jens.wiklander@linaro.org>
Fri, 18 Sep 2020 08:44:40 +0000 (10:44 +0200)
commitab3d8e1baaee4b167cc99120f640ee4de6d05d50
tree6fbfb31aeb6e903af34777474d4e771f1496508f
parent9123e3a74ec7b934a4a099e98af6a61c2f80bbf5
tee: replace cdev_add + device_add with cdev_device_add

Commit 233ed09d7fda ("chardev: add helper function to register char devs
with a struct device") added a helper function 'cdev_device_add'.

Make use of cdev_device_add in tee_device_register to replace cdev_add
and device_add. Since cdev_device_add takes care of setting the
kobj->parent, drop explicit initialisation in tee_device_alloc.

Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
drivers/tee/tee_core.c