From: Ivan Safonov Date: Mon, 20 Jun 2016 05:28:20 +0000 (+0700) Subject: staging: rtl8188eu: replace EFUSE_GetEfuseDefinition(..., TYPE_EFUSE_MAX_SECTION... X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=f573fed71213aec86c0b8ef6941a45a5e9dee7f1;p=linux-beck.git staging: rtl8188eu: replace EFUSE_GetEfuseDefinition(..., TYPE_EFUSE_MAX_SECTION, &a) with a = EFUSE_MAX_SECTION_88E This makes the code easier to read. Signed-off-by: Ivan Safonov Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/rtl8188eu/core/rtw_efuse.c b/drivers/staging/rtl8188eu/core/rtw_efuse.c index d18ea6cb01d9..550a89d9b91e 100644 --- a/drivers/staging/rtl8188eu/core/rtw_efuse.c +++ b/drivers/staging/rtl8188eu/core/rtw_efuse.c @@ -483,14 +483,11 @@ int Efuse_PgPacketRead(struct adapter *pAdapter, u8 offset, u8 *data) u8 hoffset = 0, hworden = 0; u8 tmpidx = 0; u8 tmpdata[8]; - u8 max_section = 0; u8 tmp_header = 0; - EFUSE_GetEfuseDefinition(pAdapter, EFUSE_WIFI, TYPE_EFUSE_MAX_SECTION, (void *)&max_section); - if (!data) return false; - if (offset > max_section) + if (offset > EFUSE_MAX_SECTION_88E) return false; memset(data, 0xff, sizeof(u8) * PGPKT_DATA_SIZE);