/* * netsniff-ng - the packet sniffing beast * Copyright (C) 2009, 2010 Daniel Borkmann * Copyright (C) 2012 Christoph Jaeger * Subject to the GPL, version 2. */ #ifndef PROTO_H #define PROTO_H #include #include #include "tprintf.h" struct pkt_buff; struct protocol { /* Needs to be filled out by user */ const unsigned int key; void (*print_full)(struct pkt_buff *pkt); void (*print_less)(struct pkt_buff *pkt); /* Used by program logic */ struct protocol *next; void (*process) (struct pkt_buff *pkt); }; extern void empty(struct pkt_buff *pkt); extern void _hex(uint8_t *ptr, size_t len); extern void hex(struct pkt_buff *pkt); extern void _ascii(uint8_t *ptr, size_t len); extern void ascii(struct pkt_buff *pkt); extern void hex_ascii(struct pkt_buff *pkt); #endif /* PROTO_H */ cgit.cgi/linux/net-next.git/'>net-next.git
net-next plumbingsTobias Klauser
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRui Miguel Silva <rui.silva@linaro.org>2016-07-13 14:11:20 +0100
committerGreg Kroah-Hartman <gregkh@google.com>2016-07-16 07:55:41 +0900
commit47becc556d4e8dc5bcd370100edebd6ad749b702 (patch)
treed1c5414b9499d681be30303778d1bf714fb3d4d2
parent6e720c277ad126de2052b90dd4114953f2d00f79 (diff)
greybus: power_supply: convert greybus properties to power supply properties
We need to translate greybus properties to power supply core properties, for that when parsing the properties that were fetch during configuration we check if there is a match to the running kernel version and store it in a new field (gb_prop) in the gb_power_supply_prop struct. If the corresponding property does not exist in the running kernel (because of version or vendor specific property) we drop that property. A collection of properties that, at this time, may diverge are defined in the kernel_ver.h to avoid breakage at build time and run time if this properties are not supported by the kernel. Signed-off-by: Rui Miguel Silva <rui.silva@linaro.org> Reviewed-by: Sandeep Patil <sspatil@google.com> Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
-rw-r--r--drivers/staging/greybus/kernel_ver.h14
-rw-r--r--drivers/staging/greybus/power_supply.c241
2 files changed, 246 insertions, 9 deletions
diff --git a/drivers/staging/greybus/kernel_ver.h b/drivers/staging/greybus/kernel_ver.h