device: Const-ify all device driver instance pointers
Now that device_api attribute is unmodified at runtime, as well as all the other attributes, it is possible to switch all device driver instance to be constant. A coccinelle rule is used for this: @r_const_dev_1 disable optional_qualifier @ @@ -struct device * +const struct device * @r_const_dev_2 disable optional_qualifier @ @@ -struct device * const +const struct device * Fixes #27399 Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
This commit is contained in:
parent
c8906fef79
commit
e18fcbba5a
1426 changed files with 9356 additions and 8368 deletions
|
@ -199,8 +199,8 @@ typedef void (*usb_audio_data_completion_cb_t)(const struct device *dev,
|
|||
* Pointer sturct is temporary and is valid only during the
|
||||
* execution of this callback.
|
||||
*/
|
||||
typedef void (*usb_audio_feature_updated_cb_t)(struct device *dev,
|
||||
const struct usb_audio_fu_evt *evt);
|
||||
typedef void (*usb_audio_feature_updated_cb_t)(const struct device *dev,
|
||||
const struct usb_audio_fu_evt *evt);
|
||||
|
||||
/**
|
||||
* @brief Audio callbacks used to interact with audio devices by user App.
|
||||
|
@ -257,7 +257,7 @@ size_t usb_audio_get_in_frame_size(const struct device *dev);
|
|||
* @param ops USB audio callback structure. Callback are used to
|
||||
* inform the user about what is happening
|
||||
*/
|
||||
void usb_audio_register(struct device *dev,
|
||||
void usb_audio_register(const struct device *dev,
|
||||
const struct usb_audio_ops *ops);
|
||||
|
||||
/**
|
||||
|
|
|
@ -431,7 +431,8 @@ enum hid_kbd_led {
|
|||
};
|
||||
|
||||
/* Register HID device */
|
||||
void usb_hid_register_device(struct device *dev, const uint8_t *desc, size_t size,
|
||||
void usb_hid_register_device(const struct device *dev, const uint8_t *desc,
|
||||
size_t size,
|
||||
const struct hid_ops *op);
|
||||
|
||||
/* Write to hid interrupt endpoint */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue