docs: drivers: remove suggestion to assign driver_api in init function

The driver API should be assigned at the time the device is defined.
Assigning in the init function is redundant and prevents moving the
pointer to a immutable driver structure.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
This commit is contained in:
Peter Bigot 2020-06-12 10:13:21 -05:00 committed by Maureen Helm
commit ccc53f9872

View file

@ -173,8 +173,7 @@ of these APIs, and populate an instance of subsystem_api structure:
};
The driver would then pass ``my_driver_api_funcs`` as the ``api`` argument to
``DEVICE_AND_API_INIT()``, or manually assign it to ``device->driver_api``
in the driver init function.
``DEVICE_AND_API_INIT()``.
.. note::