.. | .. |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
---|
1 | 2 | /* |
---|
2 | 3 | * Generic DSI Command Mode panel driver |
---|
3 | 4 | * |
---|
4 | 5 | * Copyright (C) 2013 Texas Instruments |
---|
5 | 6 | * Author: Tomi Valkeinen <tomi.valkeinen@ti.com> |
---|
6 | | - * |
---|
7 | | - * This program is free software; you can redistribute it and/or modify it |
---|
8 | | - * under the terms of the GNU General Public License version 2 as published by |
---|
9 | | - * the Free Software Foundation. |
---|
10 | 7 | */ |
---|
11 | 8 | |
---|
12 | 9 | /* #define DEBUG */ |
---|
.. | .. |
---|
412 | 409 | if (r) |
---|
413 | 410 | return r; |
---|
414 | 411 | |
---|
415 | | - return snprintf(buf, PAGE_SIZE, "%d\n", errors); |
---|
| 412 | + return sysfs_emit(buf, "%d\n", errors); |
---|
416 | 413 | } |
---|
417 | 414 | |
---|
418 | 415 | static ssize_t dsicm_hw_revision_show(struct device *dev, |
---|
.. | .. |
---|
442 | 439 | if (r) |
---|
443 | 440 | return r; |
---|
444 | 441 | |
---|
445 | | - return snprintf(buf, PAGE_SIZE, "%02x.%02x.%02x\n", id1, id2, id3); |
---|
| 442 | + return sysfs_emit(buf, "%02x.%02x.%02x\n", id1, id2, id3); |
---|
446 | 443 | } |
---|
447 | 444 | |
---|
448 | 445 | static ssize_t dsicm_store_ulps(struct device *dev, |
---|
.. | .. |
---|
490 | 487 | t = ddata->ulps_enabled; |
---|
491 | 488 | mutex_unlock(&ddata->lock); |
---|
492 | 489 | |
---|
493 | | - return snprintf(buf, PAGE_SIZE, "%u\n", t); |
---|
| 490 | + return sysfs_emit(buf, "%u\n", t); |
---|
494 | 491 | } |
---|
495 | 492 | |
---|
496 | 493 | static ssize_t dsicm_store_ulps_timeout(struct device *dev, |
---|
.. | .. |
---|
535 | 532 | t = ddata->ulps_timeout; |
---|
536 | 533 | mutex_unlock(&ddata->lock); |
---|
537 | 534 | |
---|
538 | | - return snprintf(buf, PAGE_SIZE, "%u\n", t); |
---|
| 535 | + return sysfs_emit(buf, "%u\n", t); |
---|
539 | 536 | } |
---|
540 | 537 | |
---|
541 | 538 | static DEVICE_ATTR(num_dsi_errors, S_IRUGO, dsicm_num_errors_show, NULL); |
---|