habanalabs: Expose devices after initialization is done
authorTomer Tayar <ttayar@habana.ai>
Thu, 8 Aug 2019 12:25:52 +0000 (12:25 +0000)
committerOded Gabbay <oded.gabbay@gmail.com>
Thu, 5 Sep 2019 11:55:27 +0000 (14:55 +0300)
commitea451f88ef9c8c8e8e3858e343f6fe85c694655c
tree6bf67f7361c923433f7c4c7fb669c24cfe626d14
parent9b50f539fff10a8283ac9c80e4ec344870b575b5
habanalabs: Expose devices after initialization is done

The char devices are currently exposed to user before the device and
driver initialization are done.
This patch moves the cdev and device adding to the system to the end of
the initialization sequence, while keeping the creation of the
structures at the beginning to allow the usage of dev_*().

Signed-off-by: Tomer Tayar <ttayar@habana.ai>
Reviewed-by: Oded Gabbay <oded.gabbay@gmail.com>
Signed-off-by: Oded Gabbay <oded.gabbay@gmail.com>
drivers/misc/habanalabs/device.c
drivers/misc/habanalabs/habanalabs.h