Commit 944b33ca authored by David S. Miller's avatar David S. Miller
Browse files

Merge branch 'nfc-pn533-const'



Rikard Falkeborn says:

====================
nfc: pn533: Constify ops-structs

Constify a couple of ops-structs. This allows the compiler to put the
static structs in read-only memory.
====================

Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parents 6d99f85e bc642817
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -156,7 +156,7 @@ static irqreturn_t pn533_i2c_irq_thread_fn(int irq, void *data)
	return IRQ_HANDLED;
}

static struct pn533_phy_ops i2c_phy_ops = {
static const struct pn533_phy_ops i2c_phy_ops = {
	.send_frame = pn533_i2c_send_frame,
	.send_ack = pn533_i2c_send_ack,
	.abort_cmd = pn533_i2c_abort_cmd,
+1 −1
Original line number Diff line number Diff line
@@ -2733,7 +2733,7 @@ EXPORT_SYMBOL_GPL(pn533_finalize_setup);
struct pn533 *pn53x_common_init(u32 device_type,
				enum pn533_protocol_type protocol_type,
				void *phy,
				struct pn533_phy_ops *phy_ops,
				const struct pn533_phy_ops *phy_ops,
				struct pn533_frame_ops *fops,
				struct device *dev)
{
+2 −2
Original line number Diff line number Diff line
@@ -177,7 +177,7 @@ struct pn533 {

	struct device *dev;
	void *phy;
	struct pn533_phy_ops *phy_ops;
	const struct pn533_phy_ops *phy_ops;
};

typedef int (*pn533_send_async_complete_t) (struct pn533 *dev, void *arg,
@@ -232,7 +232,7 @@ struct pn533_phy_ops {
struct pn533 *pn53x_common_init(u32 device_type,
				enum pn533_protocol_type protocol_type,
				void *phy,
				struct pn533_phy_ops *phy_ops,
				const struct pn533_phy_ops *phy_ops,
				struct pn533_frame_ops *fops,
				struct device *dev);

+2 −2
Original line number Diff line number Diff line
@@ -123,7 +123,7 @@ static int pn532_dev_down(struct pn533 *dev)
	return 0;
}

static struct pn533_phy_ops uart_phy_ops = {
static const struct pn533_phy_ops uart_phy_ops = {
	.send_frame = pn532_uart_send_frame,
	.send_ack = pn532_uart_send_ack,
	.abort_cmd = pn532_uart_abort_cmd,
@@ -224,7 +224,7 @@ static int pn532_receive_buf(struct serdev_device *serdev,
	return i;
}

static struct serdev_device_ops pn532_serdev_ops = {
static const struct serdev_device_ops pn532_serdev_ops = {
	.receive_buf = pn532_receive_buf,
	.write_wakeup = serdev_device_write_wakeup,
};
+1 −1
Original line number Diff line number Diff line
@@ -429,7 +429,7 @@ static void pn533_send_complete(struct urb *urb)
	}
}

static struct pn533_phy_ops usb_phy_ops = {
static const struct pn533_phy_ops usb_phy_ops = {
	.send_frame = pn533_usb_send_frame,
	.send_ack = pn533_usb_send_ack,
	.abort_cmd = pn533_usb_abort_cmd,