Skip to content

Commit 5d2f473

Browse files
committed
Merge tag 'tty-6.18-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty
Pull tty/serial updates from Greg KH: "Here are some small updates for tty/serial drivers for 6.18-rc1. Not many changes overall, just the usual: - abi cleanups and reworking of the tty functions by Jiri by adding console lock guard logic - 8250_platform driver updates - qcom-geni driver updates - other minor serial driver updates - some more vt escape codes added All of these have been in linux-next for a while with no reported issues" * tag 'tty-6.18-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty: (43 commits) tty: serial: fix help message for SERIAL_CPM serial: 8250: omap: Support wakeup pinctrl state on suspend dt-bindings: serial: 8250_omap: Add wakeup pinctrl state serial: max310x: improve interrupt handling vt: move vc_saved_screen to within tty allocated judgment Revert "m68k: make HPDCA and HPAPCI bools" tty: remove redundant condition checks tty/vt: Add missing return value for VT_RESIZE in vt_ioctl() vt: remove redundant check on vc_mode in con_font_set() serial: qcom-geni: Add DFS clock mode support to GENI UART driver m68k: make HPDCA and HPAPCI bools tty: n_gsm: Don't block input queue by waiting MSC serial: qcom-geni: Fix off-by-one error in ida_alloc_range() serdev: Drop dev_pm_domain_detach() call serial: sc16is7xx: drop redundant conversion to bool vt: add support for smput/rmput escape codes serial: stm32: allow selecting console when the driver is module serial: 8250_core: fix coding style issue tty: serial: Modify the use of dev_err_probe() s390/char/con3270: use tty_port_tty guard() ...
2 parents cc07b0a + f4abab3 commit 5d2f473

33 files changed

+1192
-1394
lines changed

Documentation/devicetree/bindings/serial/8250_omap.yaml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,22 @@ properties:
7171
overrun-throttle-ms: true
7272
wakeup-source: true
7373

74+
pinctrl-0:
75+
description: Default pinctrl state
76+
77+
pinctrl-1:
78+
description: Wakeup pinctrl state
79+
80+
pinctrl-names:
81+
description:
82+
When present should contain at least "default" describing the default pin
83+
states. The second state called "wakeup" describes the pins in their
84+
wakeup configuration required to exit sleep states.
85+
minItems: 1
86+
items:
87+
- const: default
88+
- const: wakeup
89+
7490
required:
7591
- compatible
7692
- reg

arch/mips/sgi-ip22/ip22-platform.c

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -221,3 +221,35 @@ static int __init sgi_ds1286_devinit(void)
221221
}
222222

223223
device_initcall(sgi_ds1286_devinit);
224+
225+
#define SGI_ZILOG_BASE (HPC3_CHIP0_BASE + \
226+
offsetof(struct hpc3_regs, pbus_extregs[6]) + \
227+
offsetof(struct sgioc_regs, uart))
228+
229+
static struct resource sgi_zilog_resources[] = {
230+
{
231+
.start = SGI_ZILOG_BASE,
232+
.end = SGI_ZILOG_BASE + 15,
233+
.flags = IORESOURCE_MEM
234+
},
235+
{
236+
.start = SGI_SERIAL_IRQ,
237+
.end = SGI_SERIAL_IRQ,
238+
.flags = IORESOURCE_IRQ
239+
}
240+
};
241+
242+
static struct platform_device zilog_device = {
243+
.name = "ip22zilog",
244+
.id = 0,
245+
.num_resources = ARRAY_SIZE(sgi_zilog_resources),
246+
.resource = sgi_zilog_resources,
247+
};
248+
249+
250+
static int __init sgi_zilog_devinit(void)
251+
{
252+
return platform_device_register(&zilog_device);
253+
}
254+
255+
device_initcall(sgi_zilog_devinit);

drivers/s390/char/con3270.c

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -970,8 +970,6 @@ static void tty3270_resize(struct raw3270_view *view,
970970
char **old_rcl_lines, **new_rcl_lines;
971971
char *old_prompt, *new_prompt;
972972
char *old_input, *new_input;
973-
struct tty_struct *tty;
974-
struct winsize ws;
975973
size_t prompt_sz;
976974
int new_allocated, old_allocated = tp->allocated_lines;
977975

@@ -1023,14 +1021,14 @@ static void tty3270_resize(struct raw3270_view *view,
10231021
kfree(old_prompt);
10241022
tty3270_free_recall(old_rcl_lines);
10251023
tty3270_set_timer(tp, 1);
1026-
/* Informat tty layer about new size */
1027-
tty = tty_port_tty_get(&tp->port);
1028-
if (!tty)
1029-
return;
1030-
ws.ws_row = tty3270_tty_rows(tp);
1031-
ws.ws_col = tp->view.cols;
1032-
tty_do_resize(tty, &ws);
1033-
tty_kref_put(tty);
1024+
/* Inform the tty layer about new size */
1025+
scoped_guard(tty_port_tty, &tp->port) {
1026+
struct winsize ws = {
1027+
.ws_row = tty3270_tty_rows(tp),
1028+
.ws_col = tp->view.cols,
1029+
};
1030+
tty_do_resize(scoped_tty(), &ws);
1031+
}
10341032
return;
10351033
out_screen:
10361034
tty3270_free_screen(screen, new_rows);

drivers/tty/hvc/hvc_console.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ static void hvc_console_print(struct console *co, const char *b,
184184
hvc_console_flush(cons_ops[index],
185185
vtermnos[index]);
186186
}
187-
} else if (r > 0) {
187+
} else {
188188
i -= r;
189189
if (i > 0)
190190
memmove(c, c+r, i);

0 commit comments

Comments
 (0)