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:
Bjoern A. Zeeb 2022-02-09 11:37:37 +00:00
parent 232d323ef2
commit 2e818fbcfc

View file

@ -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)
{