vfio/ccw: move private initialization to callback
authorEric Farman <farman@linux.ibm.com>
Fri, 4 Nov 2022 14:20:03 +0000 (15:20 +0100)
committerAlex Williamson <alex.williamson@redhat.com>
Thu, 10 Nov 2022 18:11:25 +0000 (11:11 -0700)
commit06caaa27df8f1a8a6be78212c5ef5cac04500176
treef39db1403b043b3524fd6d09a342c84007a9e6da
parent008a011d68036ebfa4dede07cb9b93dedaa958b1
vfio/ccw: move private initialization to callback

There's already a device initialization callback that is used to
initialize the release completion workaround that was introduced
by commit ebb72b765fb49 ("vfio/ccw: Use the new device life cycle
helpers").

Move the other elements of the vfio_ccw_private struct that
require distinct initialization over to that routine.

With that done, the vfio_ccw_alloc_private routine only does a
kzalloc, so fold it inline.

Signed-off-by: Eric Farman <farman@linux.ibm.com>
Reviewed-by: Matthew Rosato <mjrosato@linux.ibm.com>
Link: https://lore.kernel.org/r/20221104142007.1314999-4-farman@linux.ibm.com
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
drivers/s390/cio/vfio_ccw_drv.c
drivers/s390/cio/vfio_ccw_ops.c
drivers/s390/cio/vfio_ccw_private.h