s390/qeth: clean up device_type management
authorJulian Wiedmann <jwi@linux.ibm.com>
Tue, 20 Jul 2021 06:38:49 +0000 (08:38 +0200)
committerDavid S. Miller <davem@davemloft.net>
Tue, 20 Jul 2021 13:17:06 +0000 (06:17 -0700)
commitae57ea7a19b784e5982ae25bdba3cdf7c98f3067
tree59b8a1f763c6ea3918c91d6deb000243483c3e26
parenta37cfa28ebdc6a2286569ef783c4ba5c719f4902
s390/qeth: clean up device_type management

qeth uses three device_type structs - a generic one, and one for each
sub-driver (which is used for fixed-layer devices only). Instead of
exporting these device_types back&forth between the driver's modules,
make all the logic self-contained within the sub-drivers.

On disc->setup() they either install their own device_type, or add the
sysfs attributes that are missing in the generic device_type. Later on
disc->remove() these attributes are removed again from any device that
has the generic device_type.

Signed-off-by: Julian Wiedmann <jwi@linux.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/s390/net/qeth_core.h
drivers/s390/net/qeth_core_main.c
drivers/s390/net/qeth_l2_main.c
drivers/s390/net/qeth_l3_main.c