mirror of
https://github.com/ipxe/ipxe
synced 2026-01-11 16:08:34 +03:00
[build] Provide common ARRAY_SIZE() definition
Several files define the ARRAY_SIZE() macro as used in Linux. Provide a common definition for this in include/compiler.h. Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
@@ -30,7 +30,6 @@ FILE_LICENCE(GPL2_ONLY);
|
||||
#define RTL8225_ANAPARAM2_OFF 0x840dec11
|
||||
|
||||
#define min(a,b) (((a)<(b))?(a):(b))
|
||||
#define ARRAY_SIZE(a) (int)(sizeof(a)/sizeof((a)[0]))
|
||||
|
||||
static inline void rtl8225_write_phy_ofdm(struct net80211_device *dev,
|
||||
u8 addr, u8 data)
|
||||
@@ -323,7 +322,7 @@ static void rtl8225_rf_set_tx_power(struct net80211_device *dev, int channel)
|
||||
static void rtl8225_rf_init(struct net80211_device *dev)
|
||||
{
|
||||
struct rtl818x_priv *priv = dev->priv;
|
||||
int i;
|
||||
unsigned int i;
|
||||
|
||||
rtl818x_set_anaparam(priv, RTL8225_ANAPARAM_ON);
|
||||
|
||||
@@ -552,7 +551,7 @@ static const u16 rtl8225z2_rxgain[] = {
|
||||
static void rtl8225z2_rf_init(struct net80211_device *dev)
|
||||
{
|
||||
struct rtl818x_priv *priv = dev->priv;
|
||||
int i;
|
||||
unsigned int i;
|
||||
|
||||
rtl818x_set_anaparam(priv, RTL8225_ANAPARAM_ON);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user