drivers: display: stm32_ltdc: fix set orientation API
Refactors invalid switch into if statement. Fixes orientation set return value for normal display orientation. Signed-off-by: Georgij Cernysiov <geo.cgv@gmail.com>
This commit is contained in:
parent
f3204b7326
commit
b11fcc8e0c
1 changed files with 4 additions and 7 deletions
|
@ -129,16 +129,13 @@ static int stm32_ltdc_set_pixel_format(const struct device *dev,
|
||||||
static int stm32_ltdc_set_orientation(const struct device *dev,
|
static int stm32_ltdc_set_orientation(const struct device *dev,
|
||||||
const enum display_orientation orientation)
|
const enum display_orientation orientation)
|
||||||
{
|
{
|
||||||
int err;
|
ARG_UNUSED(dev);
|
||||||
|
|
||||||
switch (orientation) {
|
if (orientation == DISPLAY_ORIENTATION_NORMAL) {
|
||||||
case DISPLAY_ORIENTATION_NORMAL:
|
return 0;
|
||||||
err = 0;
|
|
||||||
default:
|
|
||||||
err = -ENOTSUP;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return err;
|
return -ENOTSUP;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void stm32_ltdc_get_capabilities(const struct device *dev,
|
static void stm32_ltdc_get_capabilities(const struct device *dev,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue