Skip to content

Commit

Permalink
Bluetooth: serdev: Constify serdev_device_ops
Browse files Browse the repository at this point in the history
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: Rikard Falkeborn <rikard.falkeborn@gmail.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
  • Loading branch information
Rikard Falkeborn authored and Marcel Holtmann committed May 13, 2020
1 parent 875e167 commit 608c39f
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions drivers/bluetooth/hci_serdev.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@

#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)
{
struct hci_dev *hdev = hu->hdev;
Expand Down Expand Up @@ -260,7 +258,7 @@ static int hci_uart_receive_buf(struct serdev_device *serdev, const u8 *data,
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,
.write_wakeup = hci_uart_write_wakeup,
};
Expand Down

0 comments on commit 608c39f

Please sign in to comment.