Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1401278 > unrolled thread
| Started by | Sinan Kaya <okaya@codeaurora.org> |
|---|---|
| First post | 2016-05-16 04:20 +0200 |
| Last post | 2016-05-23 15:20 +0200 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
[PATCH V5 3/6] vfio: platform: determine reset capability Sinan Kaya <okaya@codeaurora.org> - 2016-05-16 04:20 +0200
Re: [PATCH V5 3/6] vfio: platform: determine reset capability Eric Auger <eric.auger@linaro.org> - 2016-05-23 15:20 +0200
| From | Sinan Kaya <okaya@codeaurora.org> |
|---|---|
| Date | 2016-05-16 04:20 +0200 |
| Subject | [PATCH V5 3/6] vfio: platform: determine reset capability |
| Message-ID | <rzgiB-HG-219@gated-at.bofh.it> |
Creating a new function to determine if this driver supports reset
function or not. This is an attempt to abstract device tree calls
from the rest of the code.
Signed-off-by: Sinan Kaya <okaya@codeaurora.org>
---
drivers/vfio/platform/vfio_platform_common.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/drivers/vfio/platform/vfio_platform_common.c b/drivers/vfio/platform/vfio_platform_common.c
index cb91dd3..25378bd 100644
--- a/drivers/vfio/platform/vfio_platform_common.c
+++ b/drivers/vfio/platform/vfio_platform_common.c
@@ -49,6 +49,11 @@ static vfio_platform_reset_fn_t vfio_platform_lookup_reset(const char *compat,
return reset_fn;
}
+static bool vfio_platform_has_reset(struct vfio_platform_device *vdev)
+{
+ return vdev->of_reset ? true : false;
+}
+
static void vfio_platform_get_reset(struct vfio_platform_device *vdev)
{
vdev->of_reset = vfio_platform_lookup_reset(vdev->compat,
@@ -215,7 +220,7 @@ static long vfio_platform_ioctl(void *device_data,
if (info.argsz < minsz)
return -EINVAL;
- if (vdev->of_reset)
+ if (vfio_platform_has_reset(vdev))
vdev->flags |= VFIO_DEVICE_FLAGS_RESET;
info.flags = vdev->flags;
info.num_regions = vdev->num_regions;
--
1.8.2.1
[toc] | [next] | [standalone]
| From | Eric Auger <eric.auger@linaro.org> |
|---|---|
| Date | 2016-05-23 15:20 +0200 |
| Message-ID | <rBXW1-6lL-11@gated-at.bofh.it> |
| In reply to | #1401278 |
On 05/16/2016 04:13 AM, Sinan Kaya wrote:
> Creating a new function to determine if this driver supports reset
> function or not. This is an attempt to abstract device tree calls
> from the rest of the code.
>
> Signed-off-by: Sinan Kaya <okaya@codeaurora.org>
> ---
> drivers/vfio/platform/vfio_platform_common.c | 7 ++++++-
> 1 file changed, 6 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/vfio/platform/vfio_platform_common.c b/drivers/vfio/platform/vfio_platform_common.c
> index cb91dd3..25378bd 100644
> --- a/drivers/vfio/platform/vfio_platform_common.c
> +++ b/drivers/vfio/platform/vfio_platform_common.c
> @@ -49,6 +49,11 @@ static vfio_platform_reset_fn_t vfio_platform_lookup_reset(const char *compat,
> return reset_fn;
> }
>
> +static bool vfio_platform_has_reset(struct vfio_platform_device *vdev)
> +{
> + return vdev->of_reset ? true : false;
> +}
> +
> static void vfio_platform_get_reset(struct vfio_platform_device *vdev)
> {
> vdev->of_reset = vfio_platform_lookup_reset(vdev->compat,
> @@ -215,7 +220,7 @@ static long vfio_platform_ioctl(void *device_data,
> if (info.argsz < minsz)
> return -EINVAL;
>
> - if (vdev->of_reset)
> + if (vfio_platform_has_reset(vdev))
> vdev->flags |= VFIO_DEVICE_FLAGS_RESET;
> info.flags = vdev->flags;
> info.num_regions = vdev->num_regions;
>
Reviewed-by: Eric Auger <eric.auger@linaro.org>
Eric
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web