]> git.baikalelectronics.ru Git - kernel.git/commit
vDPA/ifcvf: allocate the adapter in dev_add()
authorZhu Lingshan <lingshan.zhu@intel.com>
Fri, 25 Nov 2022 14:57:22 +0000 (22:57 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 11 Mar 2023 12:55:42 +0000 (13:55 +0100)
commite0ed29a6eaee75f880865e31c9d76b3969ffeb88
tree89ee4ae2bb9744d495328398ca093d0a854352ef
parentc4fb01369289181499b4dd0471ac1e6da8c8bcd3
vDPA/ifcvf: allocate the adapter in dev_add()

commit edce80c402e26ccea0447ac9c6cdb8ea7d97ddb7 upstream.

The adapter is the container of the vdpa_device,
this commits allocate the adapter in dev_add()
rather than in probe(). So that the vdpa_device()
could be re-created when the userspace creates
the vdpa device, and free-ed in dev_del()

Signed-off-by: Zhu Lingshan <lingshan.zhu@intel.com>
Cc: stable@vger.kernel.org
Message-Id: <20221125145724.1129962-11-lingshan.zhu@intel.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/vdpa/ifcvf/ifcvf_main.c