}
 
 /* Requires the its_lock to be held. */
-static void vgic_its_unmap_device(struct kvm *kvm, struct its_device *device)
+static void vgic_its_free_device(struct kvm *kvm, struct its_device *device)
 {
        struct its_ite *ite, *temp;
 
         * by removing the mapping and re-establishing it.
         */
        if (device)
-               vgic_its_unmap_device(kvm, device);
+               vgic_its_free_device(kvm, device);
 
        /*
         * The spec does not say whether unmapping a not-mapped device
        return vgic_its_set_abi(its, NR_ITS_ABIS - 1);
 }
 
-static void vgic_its_free_device(struct kvm *kvm, struct its_device *dev)
-{
-       struct its_ite *ite, *tmp;
-
-       list_for_each_entry_safe(ite, tmp, &dev->itt_head, ite_list)
-               its_free_ite(kvm, ite);
-       list_del(&dev->dev_list);
-       kfree(dev);
-}
-
 static void vgic_its_destroy(struct kvm_device *kvm_dev)
 {
        struct kvm *kvm = kvm_dev->kvm;