.. | .. |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-or-later |
---|
1 | 2 | /* |
---|
2 | 3 | * Copyright (c) 2010 Sascha Hauer <s.hauer@pengutronix.de> |
---|
3 | 4 | * Copyright (C) 2005-2009 Freescale Semiconductor, Inc. |
---|
4 | | - * |
---|
5 | | - * This program is free software; you can redistribute it and/or modify it |
---|
6 | | - * under the terms of the GNU General Public License as published by the |
---|
7 | | - * Free Software Foundation; either version 2 of the License, or (at your |
---|
8 | | - * option) any later version. |
---|
9 | | - * |
---|
10 | | - * This program is distributed in the hope that it will be useful, but |
---|
11 | | - * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY |
---|
12 | | - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
---|
13 | | - * for more details. |
---|
14 | 5 | */ |
---|
15 | 6 | #include <linux/export.h> |
---|
16 | 7 | #include <linux/module.h> |
---|
.. | .. |
---|
460 | 451 | |
---|
461 | 452 | error = rate / (sig->mode.pixelclock / 1000); |
---|
462 | 453 | |
---|
463 | | - dev_dbg(di->ipu->dev, " IPU clock can give %lu with divider %u, error %d.%u%%\n", |
---|
464 | | - rate, div, (signed)(error - 1000) / 10, error % 10); |
---|
| 454 | + dev_dbg(di->ipu->dev, " IPU clock can give %lu with divider %u, error %c%d.%d%%\n", |
---|
| 455 | + rate, div, error < 1000 ? '-' : '+', |
---|
| 456 | + abs(error - 1000) / 10, abs(error - 1000) % 10); |
---|
465 | 457 | |
---|
466 | 458 | /* Allow a 1% error */ |
---|
467 | 459 | if (error < 1010 && error >= 990) { |
---|