Commit d45109c5 authored by Parker Newman's avatar Parker Newman Committed by Greg Kroah-Hartman
Browse files

misc: eeprom: eeprom_93cx6: Switch to BIT() macro

parent 7738a7ab
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -8,6 +8,7 @@
 * Supported chipsets: 93c46 & 93c66.
 */

#include <linux/bits.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/delay.h>
@@ -102,7 +103,7 @@ static void eeprom_93cx6_write_bits(struct eeprom_93cx6 *eeprom,
		/*
		 * Check if this bit needs to be set.
		 */
		eeprom->reg_data_in = !!(data & (1 << (i - 1)));
		eeprom->reg_data_in = !!(data & BIT(i - 1));

		/*
		 * Write the bit to the eeprom register.
@@ -152,7 +153,7 @@ static void eeprom_93cx6_read_bits(struct eeprom_93cx6 *eeprom,
		 * Read if the bit has been set.
		 */
		if (eeprom->reg_data_out)
			buf |= (1 << (i - 1));
			buf |= BIT(i - 1);

		eeprom_93cx6_pulse_low(eeprom);
	}