[errno code][-RT_EBUSY] fix that use RT_EBUSY without -
This commit is contained in:
parent
eb3cb250be
commit
deb40e8c0c
|
@ -195,7 +195,7 @@ static rt_err_t ifx_pin_attach_irq(struct rt_device *device, rt_int32_t pin,
|
|||
if (pin_irq_handler_tab[gpio_port].pin != -1)
|
||||
{
|
||||
rt_hw_interrupt_enable(level);
|
||||
return RT_EBUSY;
|
||||
return -RT_EBUSY;
|
||||
}
|
||||
|
||||
pin_irq_handler_tab[gpio_port].pin = pin;
|
||||
|
|
|
@ -248,7 +248,7 @@ static rt_err_t v85xx_pin_attach_irq(struct rt_device *device, rt_int32_t pin,
|
|||
if (pin_irq_hdr_tab[irqindex].pin != -1)
|
||||
{
|
||||
rt_hw_interrupt_enable(level);
|
||||
return RT_EBUSY;
|
||||
return -RT_EBUSY;
|
||||
}
|
||||
pin_irq_hdr_tab[irqindex].pin = pin;
|
||||
pin_irq_hdr_tab[irqindex].hdr = hdr;
|
||||
|
|
|
@ -249,7 +249,7 @@ static rt_err_t V85XXP_pin_attach_irq(struct rt_device *device, rt_int32_t pin,
|
|||
if (pin_irq_hdr_tab[irqindex].pin != -1)
|
||||
{
|
||||
rt_hw_interrupt_enable(level);
|
||||
return RT_EBUSY;
|
||||
return -RT_EBUSY;
|
||||
}
|
||||
pin_irq_hdr_tab[irqindex].pin = pin;
|
||||
pin_irq_hdr_tab[irqindex].hdr = hdr;
|
||||
|
|
|
@ -336,7 +336,7 @@ static rt_err_t acm32_pin_attach_irq(struct rt_device *device, rt_int32_t pin,
|
|||
if (pin_irq_hdr_tab[irqindex].pin != -1)
|
||||
{
|
||||
rt_hw_interrupt_enable(level);
|
||||
return RT_EBUSY;
|
||||
return -RT_EBUSY;
|
||||
}
|
||||
|
||||
pin_irq_hdr_tab[irqindex].pin = pin;
|
||||
|
|
|
@ -308,7 +308,7 @@ static rt_err_t _pin_attach_irq(struct rt_device *device, rt_int32_t pin,
|
|||
if (pin_irq_hdr_tab[irqindex].pin != -1)
|
||||
{
|
||||
rt_hw_interrupt_enable(level);
|
||||
return RT_EBUSY;
|
||||
return -RT_EBUSY;
|
||||
}
|
||||
|
||||
pin_irq_hdr_tab[irqindex].pin = pin;
|
||||
|
|
|
@ -355,7 +355,7 @@ static rt_err_t apm32_pin_attach_irq(struct rt_device *device, rt_base_t pin,
|
|||
if (pin_irq_hdr_tab[irqindex].pin != -1)
|
||||
{
|
||||
rt_hw_interrupt_enable(level);
|
||||
return RT_EBUSY;
|
||||
return -RT_EBUSY;
|
||||
}
|
||||
pin_irq_hdr_tab[irqindex].pin = pin;
|
||||
pin_irq_hdr_tab[irqindex].hdr = hdr;
|
||||
|
|
|
@ -363,7 +363,7 @@ rt_err_t es32f0_pin_attach_irq(struct rt_device *device, rt_int32_t pin,
|
|||
if (pin_irq_hdr_tab[irqindex].pin != -1)
|
||||
{
|
||||
rt_hw_interrupt_enable(level);
|
||||
return RT_EBUSY;
|
||||
return -RT_EBUSY;
|
||||
}
|
||||
pin_irq_hdr_tab[irqindex].pin = pin;
|
||||
pin_irq_hdr_tab[irqindex].hdr = hdr;
|
||||
|
|
|
@ -365,7 +365,7 @@ rt_err_t es32f3_pin_attach_irq(struct rt_device *device, rt_int32_t pin,
|
|||
if (pin_irq_hdr_tab[irqindex].pin != -1)
|
||||
{
|
||||
rt_hw_interrupt_enable(level);
|
||||
return RT_EBUSY;
|
||||
return -RT_EBUSY;
|
||||
}
|
||||
pin_irq_hdr_tab[irqindex].pin = pin;
|
||||
pin_irq_hdr_tab[irqindex].hdr = hdr;
|
||||
|
|
|
@ -266,7 +266,7 @@ static rt_err_t fm33_pin_attach_irq(struct rt_device *device, rt_int32_t pin,
|
|||
if (pin_irq_hdr_tab[irqindex].pin != -1)
|
||||
{
|
||||
rt_hw_interrupt_enable(level);
|
||||
return RT_EBUSY;
|
||||
return -RT_EBUSY;
|
||||
}
|
||||
pin_irq_hdr_tab[irqindex].pin = pin;
|
||||
pin_irq_hdr_tab[irqindex].hdr = hdr;
|
||||
|
|
|
@ -249,7 +249,7 @@ static rt_err_t ft32_pin_attach_irq(struct rt_device *device, rt_int32_t pin,
|
|||
if (pin_irq_hdr_tab[irqindex].pin != -1)
|
||||
{
|
||||
rt_hw_interrupt_enable(level);
|
||||
return RT_EBUSY;
|
||||
return -RT_EBUSY;
|
||||
}
|
||||
pin_irq_hdr_tab[irqindex].pin = pin;
|
||||
pin_irq_hdr_tab[irqindex].hdr = hdr;
|
||||
|
|
|
@ -293,7 +293,7 @@ static rt_err_t gd32vf_pin_attach_irq(struct rt_device *device, rt_int32_t pin,
|
|||
if (pin_irq_hdr_tab[irqindex].pin != -1)
|
||||
{
|
||||
rt_hw_interrupt_enable(level);
|
||||
return RT_EBUSY;
|
||||
return -RT_EBUSY;
|
||||
}
|
||||
pin_irq_hdr_tab[irqindex].pin = pin;
|
||||
pin_irq_hdr_tab[irqindex].hdr = hdr;
|
||||
|
|
|
@ -330,7 +330,7 @@ static rt_err_t hc32_pin_attach_irq(struct rt_device *device, rt_int32_t pin,
|
|||
if (pin_irq_hdr_tab[irqindex].pin != -1)
|
||||
{
|
||||
rt_hw_interrupt_enable(level);
|
||||
return RT_EBUSY;
|
||||
return -RT_EBUSY;
|
||||
}
|
||||
pin_irq_hdr_tab[irqindex].pin = pin;
|
||||
pin_irq_hdr_tab[irqindex].hdr = hdr;
|
||||
|
|
|
@ -246,7 +246,7 @@ static rt_err_t _pin_attach_irq(struct rt_device *device, rt_int32_t pin,
|
|||
if (pin_irq_hdr_tab[irqindex].pin != -1)
|
||||
{
|
||||
rt_hw_interrupt_enable(level);
|
||||
return RT_EBUSY;
|
||||
return -RT_EBUSY;
|
||||
}
|
||||
pin_irq_hdr_tab[irqindex].pin = pin;
|
||||
pin_irq_hdr_tab[irqindex].hdr = hdr;
|
||||
|
|
|
@ -245,7 +245,7 @@ static rt_err_t mm32_pin_attach_irq(struct rt_device *device, rt_int32_t pin,
|
|||
if (pin_irq_hdr_tab[irqindex].pin != -1)
|
||||
{
|
||||
rt_hw_interrupt_enable(level);
|
||||
return RT_EBUSY;
|
||||
return -RT_EBUSY;
|
||||
}
|
||||
pin_irq_hdr_tab[irqindex].pin = pin;
|
||||
pin_irq_hdr_tab[irqindex].hdr = hdr;
|
||||
|
|
|
@ -442,7 +442,7 @@ static rt_err_t n32_pin_attach_irq(struct rt_device *device, rt_int32_t pin,
|
|||
if (pin_irq_hdr_tab[irqindex].pin != -1)
|
||||
{
|
||||
rt_hw_interrupt_enable(level);
|
||||
return RT_EBUSY;
|
||||
return -RT_EBUSY;
|
||||
}
|
||||
pin_irq_hdr_tab[irqindex].pin = pin;
|
||||
pin_irq_hdr_tab[irqindex].hdr = hdr;
|
||||
|
|
|
@ -260,7 +260,7 @@ static rt_err_t nrf5x_pin_attach_irq(struct rt_device *device, rt_int32_t pin,
|
|||
switch(err_code)
|
||||
{
|
||||
case NRFX_ERROR_BUSY:
|
||||
return RT_EBUSY;
|
||||
return -RT_EBUSY;
|
||||
case NRFX_SUCCESS:
|
||||
return RT_EOK;
|
||||
case NRFX_ERROR_NO_MEM:
|
||||
|
|
|
@ -287,7 +287,7 @@ static rt_err_t gd32_pin_attach_irq(struct rt_device *device, rt_int32_t pin,
|
|||
if (pin_irq_hdr_tab[irqindex].pin != -1)
|
||||
{
|
||||
rt_hw_interrupt_enable(level);
|
||||
return RT_EBUSY;
|
||||
return -RT_EBUSY;
|
||||
}
|
||||
pin_irq_hdr_tab[irqindex].pin = pin;
|
||||
pin_irq_hdr_tab[irqindex].hdr = hdr;
|
||||
|
|
|
@ -138,7 +138,7 @@ static rt_err_t nu_get_eadc_value(struct rt_adc_device *device, rt_uint32_t chan
|
|||
if ((psNuEADC->chn_msk & (1 << channel)) == 0)
|
||||
{
|
||||
*value = 0xFFFFFFFF;
|
||||
ret = RT_EBUSY;
|
||||
ret = -RT_EBUSY;
|
||||
goto exit_nu_get_eadc_value;
|
||||
}
|
||||
|
||||
|
|
|
@ -249,7 +249,7 @@ static rt_err_t ra_pin_attach_irq(struct rt_device *device, rt_int32_t pin,
|
|||
if (pin_irq_hdr_tab[irqx].pin != -1)
|
||||
{
|
||||
rt_hw_interrupt_enable(level);
|
||||
return RT_EBUSY;
|
||||
return -RT_EBUSY;
|
||||
}
|
||||
pin_irq_hdr_tab[irqx].pin = irqx;
|
||||
pin_irq_hdr_tab[irqx].hdr = hdr;
|
||||
|
|
|
@ -113,7 +113,7 @@ static rt_err_t pin_attach_irq(struct rt_device *device, rt_int32_t pin,
|
|||
if (pin_irq_hdr_tab[pin].pin != BANK_PIN_DEFAULT && pin_irq_hdr_tab[pin].hdr != RT_NULL)
|
||||
{
|
||||
rt_hw_interrupt_enable(level);
|
||||
return RT_EBUSY;
|
||||
return -RT_EBUSY;
|
||||
}
|
||||
|
||||
pin_irq_hdr_tab[pin].pin = pin;
|
||||
|
|
|
@ -1028,7 +1028,7 @@ static rt_err_t rt_serial_control(struct rt_device *dev,
|
|||
if (pconfig->bufsz != serial->config.bufsz && serial->parent.ref_count)
|
||||
{
|
||||
/*can not change buffer size*/
|
||||
return RT_EBUSY;
|
||||
return -RT_EBUSY;
|
||||
}
|
||||
/* set serial configure */
|
||||
serial->config = *pconfig;
|
||||
|
|
Loading…
Reference in New Issue