Commit 608c39f4 authored by Rikard Falkeborn's avatar Rikard Falkeborn Committed by Marcel Holtmann

Bluetooth: serdev: Constify serdev_device_ops

serdev_device_ops is not modified and can be const. Also, remove the
unneeded declaration of it.

Output from the file command before and after:

Before:
   text    data     bss     dec     hex filename
   7192    2408     192    9792    2640 drivers/bluetooth/hci_serdev.o

After:
   text    data     bss     dec     hex filename
   7256    2344     192    9792    2640 drivers/bluetooth/hci_serdev.o
Signed-off-by: default avatarRikard Falkeborn <rikard.falkeborn@gmail.com>
Signed-off-by: default avatarMarcel Holtmann <marcel@holtmann.org>
parent 875e1675
...@@ -21,8 +21,6 @@ ...@@ -21,8 +21,6 @@
#include "hci_uart.h" #include "hci_uart.h"
static struct serdev_device_ops hci_serdev_client_ops;
static inline void hci_uart_tx_complete(struct hci_uart *hu, int pkt_type) static inline void hci_uart_tx_complete(struct hci_uart *hu, int pkt_type)
{ {
struct hci_dev *hdev = hu->hdev; struct hci_dev *hdev = hu->hdev;
...@@ -260,7 +258,7 @@ static int hci_uart_receive_buf(struct serdev_device *serdev, const u8 *data, ...@@ -260,7 +258,7 @@ static int hci_uart_receive_buf(struct serdev_device *serdev, const u8 *data,
return count; return count;
} }
static struct serdev_device_ops hci_serdev_client_ops = { static const struct serdev_device_ops hci_serdev_client_ops = {
.receive_buf = hci_uart_receive_buf, .receive_buf = hci_uart_receive_buf,
.write_wakeup = hci_uart_write_wakeup, .write_wakeup = hci_uart_write_wakeup,
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment