diff options
author | Heiner Kallweit <hkallweit1@gmail.com> | 2017-03-02 20:48:53 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-03-09 17:31:56 +0100 |
commit | 18c6142168d061916f7020b80b2f746d4323b65d (patch) | |
tree | a3f0973bdd2debd67162f1d6ce1b0f1384067c28 /drivers/staging/fbtft | |
parent | 425e586cf95b83b424bc949ea1c0c8bb2a2be608 (diff) | |
download | linux-stable-18c6142168d061916f7020b80b2f746d4323b65d.tar.gz linux-stable-18c6142168d061916f7020b80b2f746d4323b65d.tar.bz2 linux-stable-18c6142168d061916f7020b80b2f746d4323b65d.zip |
staging: fbtft: improve a syslog message in fbtft_register_framebuffer
There are drivers like fb_sh1106 which allocate a txbuf less than 1 KiB.
In this case the message would include "0 KiB buffer memory" what
doesn't make sense and in general I doubt that there is any benefit in
informing the user about allocation of a very small buffer.
Therefore omit this message part if the buffer has less than 1 KiB.
Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/fbtft')
-rw-r--r-- | drivers/staging/fbtft/fbtft-core.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/staging/fbtft/fbtft-core.c b/drivers/staging/fbtft/fbtft-core.c index b89183421cb2..429b52431f88 100644 --- a/drivers/staging/fbtft/fbtft-core.c +++ b/drivers/staging/fbtft/fbtft-core.c @@ -956,7 +956,7 @@ int fbtft_register_framebuffer(struct fb_info *fb_info) fbtft_sysfs_init(par); - if (par->txbuf.buf) + if (par->txbuf.buf && par->txbuf.len >= 1024) sprintf(text1, ", %zu KiB buffer memory", par->txbuf.len >> 10); if (spi) sprintf(text2, ", spi%d.%d at %d MHz", spi->master->bus_num, |