mirror of
https://github.com/opnsense/src.git
synced 2026-06-04 22:32:43 -04:00
LinuxKPI: add get_unaligned_le16()
Add get_unaligned_le16() to asm/unaligned.h needed by a driver. MFC after: 3 days Reviewed by: hselasky Differential Revision: https://reviews.freebsd.org/D34224
This commit is contained in:
parent
232d323ef2
commit
2e818fbcfc
1 changed files with 7 additions and 0 deletions
|
|
@ -36,6 +36,13 @@
|
|||
#include <linux/types.h>
|
||||
#include <asm/byteorder.h>
|
||||
|
||||
static __inline uint16_t
|
||||
get_unaligned_le16(const void *p)
|
||||
{
|
||||
|
||||
return (le16_to_cpup((const __le16 *)p));
|
||||
}
|
||||
|
||||
static __inline uint32_t
|
||||
get_unaligned_le32(const void *p)
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in a new issue