bits:rename __set_bit to set_bit __clear_bit to clear_bit
This used for add pci ep drver framework Signed-off-by: lipengfei28 <lipengfei28@xiaomi.com>
This commit is contained in:
parent
a2845faee3
commit
b18262d78f
@ -229,7 +229,7 @@ int coresight_get_system_trace_id(void)
|
|||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
__set_bit(traceid, g_coresight_trace_id_bitmap);
|
set_bit(traceid, g_coresight_trace_id_bitmap);
|
||||||
spin_unlock_irqrestore(&g_coresight_trace_id_lock, flags);
|
spin_unlock_irqrestore(&g_coresight_trace_id_lock, flags);
|
||||||
|
|
||||||
return traceid;
|
return traceid;
|
||||||
@ -251,7 +251,7 @@ void coresight_put_system_trace_id(int traceid)
|
|||||||
irqstate_t flags;
|
irqstate_t flags;
|
||||||
|
|
||||||
flags = spin_lock_irqsave(&g_coresight_trace_id_lock);
|
flags = spin_lock_irqsave(&g_coresight_trace_id_lock);
|
||||||
__clear_bit(traceid, g_coresight_trace_id_bitmap);
|
clear_bit(traceid, g_coresight_trace_id_bitmap);
|
||||||
spin_unlock_irqrestore(&g_coresight_trace_id_lock, flags);
|
spin_unlock_irqrestore(&g_coresight_trace_id_lock, flags);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -355,11 +355,11 @@ int stm_set_channel_options(FAR struct coresight_stm_dev_s *stmdev,
|
|||||||
switch (options)
|
switch (options)
|
||||||
{
|
{
|
||||||
case STM_OPTION_GUARANTEED:
|
case STM_OPTION_GUARANTEED:
|
||||||
__set_bit(channel, stmdev->guaranteed);
|
set_bit(channel, stmdev->guaranteed);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case STM_OPTION_INVARIANT:
|
case STM_OPTION_INVARIANT:
|
||||||
__clear_bit(channel, stmdev->guaranteed);
|
clear_bit(channel, stmdev->guaranteed);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
@ -2397,10 +2397,10 @@ int aw86225_initialize(FAR struct i2c_master_s *master,
|
|||||||
aw86225_haptic_init(aw86225);
|
aw86225_haptic_init(aw86225);
|
||||||
aw86225_ram_work_init(aw86225);
|
aw86225_ram_work_init(aw86225);
|
||||||
|
|
||||||
__set_bit(FF_CUSTOM, lower->ffbit);
|
set_bit(FF_CUSTOM, lower->ffbit);
|
||||||
__set_bit(FF_GAIN, lower->ffbit);
|
set_bit(FF_GAIN, lower->ffbit);
|
||||||
__set_bit(FF_CONSTANT, lower->ffbit);
|
set_bit(FF_CONSTANT, lower->ffbit);
|
||||||
__set_bit(FF_PERIODIC, lower->ffbit);
|
set_bit(FF_PERIODIC, lower->ffbit);
|
||||||
|
|
||||||
if (aw86225->effects_count + 1 > FF_EFFECT_COUNT_MAX)
|
if (aw86225->effects_count + 1 > FF_EFFECT_COUNT_MAX)
|
||||||
{
|
{
|
||||||
|
@ -120,10 +120,10 @@ int ff_dummy_initialize(int devno)
|
|||||||
|
|
||||||
/* set dummy device capabilities */
|
/* set dummy device capabilities */
|
||||||
|
|
||||||
__set_bit(FF_CUSTOM, lower->ffbit);
|
set_bit(FF_CUSTOM, lower->ffbit);
|
||||||
__set_bit(FF_GAIN, lower->ffbit);
|
set_bit(FF_GAIN, lower->ffbit);
|
||||||
__set_bit(FF_CONSTANT, lower->ffbit);
|
set_bit(FF_CONSTANT, lower->ffbit);
|
||||||
__set_bit(FF_PERIODIC, lower->ffbit);
|
set_bit(FF_PERIODIC, lower->ffbit);
|
||||||
|
|
||||||
snprintf(path, FF_DEVNAME_MAX, FF_DEVNAME_FMT, devno);
|
snprintf(path, FF_DEVNAME_MAX, FF_DEVNAME_FMT, devno);
|
||||||
ret = ff_register(lower, path, FF_EFFECT_COUNT_MAX);
|
ret = ff_register(lower, path, FF_EFFECT_COUNT_MAX);
|
||||||
|
@ -431,11 +431,11 @@ static int max7219_putrun(FAR struct lcd_dev_s *dev, fb_coord_t row,
|
|||||||
{
|
{
|
||||||
if ((*buffer & usrmask) != 0)
|
if ((*buffer & usrmask) != 0)
|
||||||
{
|
{
|
||||||
__set_bit(col % 8 + i, ptr);
|
set_bit(col % 8 + i, ptr);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
__clear_bit(col % 8 + i, ptr);
|
clear_bit(col % 8 + i, ptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef CONFIG_LCD_PACKEDMSFIRST
|
#ifdef CONFIG_LCD_PACKEDMSFIRST
|
||||||
|
@ -433,11 +433,11 @@ static int memlcd_putrun(FAR struct lcd_dev_s *dev,
|
|||||||
{
|
{
|
||||||
if ((*buffer & usrmask) != 0)
|
if ((*buffer & usrmask) != 0)
|
||||||
{
|
{
|
||||||
__set_bit(col % 8 + i, p);
|
set_bit(col % 8 + i, p);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
__clear_bit(col % 8 + i, p);
|
clear_bit(col % 8 + i, p);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef CONFIG_MEMLCD_BYTE_PER_PIXEL
|
#ifdef CONFIG_MEMLCD_BYTE_PER_PIXEL
|
||||||
|
@ -81,11 +81,11 @@
|
|||||||
#define DECLARE_BITMAP(name, bits) \
|
#define DECLARE_BITMAP(name, bits) \
|
||||||
unsigned long name[BITS_TO_LONGS(bits)]
|
unsigned long name[BITS_TO_LONGS(bits)]
|
||||||
|
|
||||||
#define __set_bit(nr, addr) \
|
#define set_bit(nr, addr) \
|
||||||
(*(((FAR unsigned long *)(addr)) + BIT_WORD(nr)) |= \
|
(*(((FAR unsigned long *)(addr)) + BIT_WORD(nr)) |= \
|
||||||
BIT_WORD_MASK(nr))
|
BIT_WORD_MASK(nr))
|
||||||
|
|
||||||
#define __clear_bit(nr, addr) \
|
#define clear_bit(nr, addr) \
|
||||||
(*(((FAR unsigned long *)(addr)) + BIT_WORD(nr)) &= \
|
(*(((FAR unsigned long *)(addr)) + BIT_WORD(nr)) &= \
|
||||||
~BIT_WORD_MASK(nr))
|
~BIT_WORD_MASK(nr))
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user