diff options
Diffstat (limited to 'drivers/staging/fbtft/fbtft-core.c')
-rw-r--r-- | drivers/staging/fbtft/fbtft-core.c | 27 |
1 files changed, 8 insertions, 19 deletions
diff --git a/drivers/staging/fbtft/fbtft-core.c b/drivers/staging/fbtft/fbtft-core.c index 6d0363deba61..0e36b66ae5f7 100644 --- a/drivers/staging/fbtft/fbtft-core.c +++ b/drivers/staging/fbtft/fbtft-core.c @@ -1,19 +1,10 @@ +// SPDX-License-Identifier: GPL-2.0+ /* * Copyright (C) 2013 Noralf Tronnes * * This driver is inspired by: * st7735fb.c, Copyright (C) 2011, Matt Porter * broadsheetfb.c, Copyright (C) 2008, Jaya Kumar - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. */ #include <linux/module.h> @@ -1367,20 +1358,18 @@ int fbtft_probe_common(struct fbtft_display *display, } /* write register functions */ - if (display->regwidth == 8 && display->buswidth == 8) { + if (display->regwidth == 8 && display->buswidth == 8) par->fbtftops.write_register = fbtft_write_reg8_bus8; - } else - if (display->regwidth == 8 && display->buswidth == 9 && par->spi) { + else if (display->regwidth == 8 && display->buswidth == 9 && par->spi) par->fbtftops.write_register = fbtft_write_reg8_bus9; - } else if (display->regwidth == 16 && display->buswidth == 8) { + else if (display->regwidth == 16 && display->buswidth == 8) par->fbtftops.write_register = fbtft_write_reg16_bus8; - } else if (display->regwidth == 16 && display->buswidth == 16) { + else if (display->regwidth == 16 && display->buswidth == 16) par->fbtftops.write_register = fbtft_write_reg16_bus16; - } else { + else dev_warn(dev, - "no default functions for regwidth=%d and buswidth=%d\n", - display->regwidth, display->buswidth); - } + "no default functions for regwidth=%d and buswidth=%d\n", + display->regwidth, display->buswidth); /* write_vmem() functions */ if (display->buswidth == 8) |