All of lore.kernel.org
 help / color / mirror / Atom feed
From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Hans Verkuil <hverkuil@xs4all.nl>
Cc: linux-media@vger.kernel.org,
	Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>,
	Sakari Ailus <sakari.ailus@iki.fi>,
	Sylwester Nawrocki <snawrocki@kernel.org>,
	Hans Verkuil <hans.verkuil@cisco.com>
Subject: Re: [PATCH 1/4] media-device: set driver_version in media_device_init
Date: Fri, 21 Jul 2017 13:12:04 +0300	[thread overview]
Message-ID: <3878230.p4nklYSnFj@avalon> (raw)
In-Reply-To: <20170721090234.6501-2-hverkuil@xs4all.nl>

Hi Hans,

Thank you for the patch.

On Friday 21 Jul 2017 11:02:31 Hans Verkuil wrote:
> From: Hans Verkuil <hans.verkuil@cisco.com>
> 
> Set the driver_version to LINUX_VERSION_CODE in the media_device_init
> call, just as the other media subsystems do.
> 
> There is no point in doing anything else, since version numbers that
> are set by drivers are never, ever updated. LINUX_VERSION_CODE will
> be updated, and is also set correctly when backporting the media
> subsystem to an older kernel using the media_build system.
> 
> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>

Wouldn't it be even better to drop the driver_version field completely from 
struct media_device, as it's now hardcoded ?

> ---
>  drivers/media/media-device.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/drivers/media/media-device.c b/drivers/media/media-device.c
> index fce91b543c14..2beffe3e3464 100644
> --- a/drivers/media/media-device.c
> +++ b/drivers/media/media-device.c
> @@ -681,6 +681,7 @@ void media_device_init(struct media_device *mdev)
>  	INIT_LIST_HEAD(&mdev->entity_notify);
>  	mutex_init(&mdev->graph_mutex);
>  	ida_init(&mdev->entity_internal_idx);
> +	mdev->driver_version = LINUX_VERSION_CODE;
> 
>  	dev_dbg(mdev->dev, "Media device initialized\n");
>  }
> @@ -833,8 +834,6 @@ void media_device_pci_init(struct media_device *mdev,
>  	mdev->hw_revision = (pci_dev->subsystem_vendor << 16)
> 
>  			    | pci_dev->subsystem_device;
> 
> -	mdev->driver_version = LINUX_VERSION_CODE;
> -
>  	media_device_init(mdev);
>  }
>  EXPORT_SYMBOL_GPL(media_device_pci_init);
> @@ -862,7 +861,6 @@ void __media_device_usb_init(struct media_device *mdev,
>  		strlcpy(mdev->serial, udev->serial, sizeof(mdev->serial));
>  	usb_make_path(udev, mdev->bus_info, sizeof(mdev->bus_info));
>  	mdev->hw_revision = le16_to_cpu(udev->descriptor.bcdDevice);
> -	mdev->driver_version = LINUX_VERSION_CODE;
> 
>  	media_device_init(mdev);
>  }

-- 
Regards,

Laurent Pinchart

  reply	other threads:[~2017-07-21 10:11 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-21  9:02 [PATCH 0/4] media: set driver_version in media_device_init Hans Verkuil
2017-07-21  9:02 ` [PATCH 1/4] media-device: " Hans Verkuil
2017-07-21 10:12   ` Laurent Pinchart [this message]
2017-07-21 10:18     ` Hans Verkuil
2017-07-21  9:02 ` [PATCH 2/4] s3c-camif: don't set driver_version anymore Hans Verkuil
2017-07-21  9:02 ` [PATCH 3/4] uvc: " Hans Verkuil
2017-07-21 10:10   ` Laurent Pinchart
2017-07-21  9:02 ` [PATCH 4/4] atomisp2: " Hans Verkuil
2017-07-21 10:10   ` Laurent Pinchart

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3878230.p4nklYSnFj@avalon \
    --to=laurent.pinchart@ideasonboard.com \
    --cc=hans.verkuil@cisco.com \
    --cc=hverkuil@xs4all.nl \
    --cc=laurent.pinchart+renesas@ideasonboard.com \
    --cc=linux-media@vger.kernel.org \
    --cc=sakari.ailus@iki.fi \
    --cc=snawrocki@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.