[Devel] [PATCH v2 01/27] connector: remove redundant input callback from cn_dev

Stanislav Kinsburskiy skinsbursky at virtuozzo.com
Thu Aug 17 16:59:06 MSK 2017


A small cleanup: this callback is never used.

Signed-off-by: Stanislav Kinsburskiy <skinsbursky at virtuozzo.com>
---
 drivers/connector/connector.c |    6 +-----
 include/linux/connector.h     |    1 -
 2 files changed, 1 insertion(+), 6 deletions(-)

diff --git a/drivers/connector/connector.c b/drivers/connector/connector.c
index 0daa11e..da26064 100644
--- a/drivers/connector/connector.c
+++ b/drivers/connector/connector.c
@@ -253,16 +253,12 @@ static const struct file_operations cn_file_ops = {
 	.release = single_release
 };
 
-static struct cn_dev cdev = {
-	.input   = cn_rx_skb,
-};
-
 static int cn_init(void)
 {
 	struct cn_dev *dev = &cdev;
 	struct netlink_kernel_cfg cfg = {
 		.groups	= CN_NETLINK_USERS + 0xf,
-		.input	= dev->input,
+		.input	= cn_rx_skb,
 	};
 
 	dev->nls = netlink_kernel_create(&init_net, NETLINK_CONNECTOR, &cfg);
diff --git a/include/linux/connector.h b/include/linux/connector.h
index b2b5a41..4c4d2b9 100644
--- a/include/linux/connector.h
+++ b/include/linux/connector.h
@@ -63,7 +63,6 @@ struct cn_dev {
 
 	u32 seq, groups;
 	struct sock *nls;
-	void (*input) (struct sk_buff *skb);
 
 	struct cn_queue_dev *cbdev;
 };



More information about the Devel mailing list