diff options
author | Tony Lindgren <tony@atomide.com> | 2023-08-04 15:35:44 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2023-08-04 15:11:59 +0200 |
commit | bbb4abb1bcfb5c25bc022ccecfea919286093b5d (patch) | |
tree | dd88215f3c34cff5e76034840332c76cdd903077 /lib/crypto/mpi/mpi-mod.c | |
parent | 6be1a8d50b381ca022a79e47f2dc0d3aa698af14 (diff) |
serial: 8250: Reinit port_id when adding back serial8250_isa_devs
After fixing the serial core port device to use port->port_id instead of
port->line, unloading a hardware specific 8250 port driver started
producing an error for "sysfs: cannot create duplicate filename".
This is happening as we are wrongly initializing port->port_id to zero
when adding back serial8250_isa_devs instances, and the serial8250:0.0
sysfs entry may already exist. For serial8250 devices, we typically have
multiple devices mapped to a single driver instance. For the
serial8250_isa_devs instances, the port->port_id is the same as port->line.
Let's fix the issue by re-initializing port_id when adding back the
serial8250_isa_devs instances in serial8250_unregister_port().
Fixes: d962de6ae51f ("serial: core: Fix serial core port id to not use port->line")
Signed-off-by: Tony Lindgren <tony@atomide.com>
Link: https://lore.kernel.org/r/20230804123546.25293-1-tony@atomide.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'lib/crypto/mpi/mpi-mod.c')
0 files changed, 0 insertions, 0 deletions