diff options
Diffstat (limited to 'drivers/vfio/platform/vfio_platform_common.c')
-rw-r--r-- | drivers/vfio/platform/vfio_platform_common.c | 22 |
1 files changed, 8 insertions, 14 deletions
diff --git a/drivers/vfio/platform/vfio_platform_common.c b/drivers/vfio/platform/vfio_platform_common.c index c0cd824be2b7..e8f2bdbe0542 100644 --- a/drivers/vfio/platform/vfio_platform_common.c +++ b/drivers/vfio/platform/vfio_platform_common.c @@ -1,17 +1,11 @@ +// SPDX-License-Identifier: GPL-2.0-only /* * Copyright (C) 2013 - Virtual Open Systems * Author: Antonios Motakis <a.motakis@virtualopensystems.com> - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License, version 2, as - * published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. */ +#define dev_fmt(fmt) "VFIO: " fmt + #include <linux/device.h> #include <linux/acpi.h> #include <linux/iommu.h> @@ -63,7 +57,7 @@ static int vfio_platform_acpi_probe(struct vfio_platform_device *vdev, adev = ACPI_COMPANION(dev); if (!adev) { - pr_err("VFIO: ACPI companion device not found for %s\n", + dev_err(dev, "ACPI companion device not found for %s\n", vdev->name); return -ENODEV; } @@ -638,7 +632,7 @@ static int vfio_platform_of_probe(struct vfio_platform_device *vdev, ret = device_property_read_string(dev, "compatible", &vdev->compat); if (ret) - pr_err("VFIO: Cannot retrieve compat for %s\n", vdev->name); + dev_err(dev, "Cannot retrieve compat for %s\n", vdev->name); return ret; } @@ -680,14 +674,14 @@ int vfio_platform_probe_common(struct vfio_platform_device *vdev, ret = vfio_platform_get_reset(vdev); if (ret && vdev->reset_required) { - pr_err("VFIO: No reset function found for device %s\n", - vdev->name); + dev_err(dev, "No reset function found for device %s\n", + vdev->name); return ret; } group = vfio_iommu_group_get(dev); if (!group) { - pr_err("VFIO: No IOMMU group for device %s\n", vdev->name); + dev_err(dev, "No IOMMU group for device %s\n", vdev->name); ret = -EINVAL; goto put_reset; } |