All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Howells <dhowells@redhat.com>
To: Sean Young <sean@mess.org>
Cc: dhowells@redhat.com,
	Mauro Carvalho Chehab <mchehab+samsung@kernel.org>,
	Michael Krufky <mkrufky@linuxtv.org>,
	Brad Love <brad@nextdimension.cc>,
	mchehab@kernel.org, linux-media@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] dvb: Allow MAC addresses to be mapped to stable device names with udev
Date: Wed, 31 Oct 2018 11:19:28 +0000	[thread overview]
Message-ID: <12108.1540984768@warthog.procyon.org.uk> (raw)
In-Reply-To: <20181031104912.s3tqjl3u43ou3kwo@gofer.mess.org>

Sean Young <sean@mess.org> wrote:

> > > Devices without a mac address shouldn't have a mac_dvb sysfs attribute,
> > > I think.
> > 
> > I'm not sure that's possible within the core infrastructure.  It's a class
> > attribute set when the class is created; I'm not sure it can be overridden on
> > a per-device basis.
> > 
> > Possibly the file could return "" or "none" in this case?
> 
> That's very ugly. Have a look at, for example, rc-core wakeup filters:
> 
> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/media/rc/rc-main.c#n1844

By analogy, then, I think the thing to do is to put something like struct
rc_dev::sysfs_groups[] into struct dvb_device (or maybe struct dvb_adapter)
and then the dvb_mac attribute in there during dvb_register_device() based on
whether or not the MAC address is not all zeros at that point.

David

  parent reply	other threads:[~2018-10-31 11:19 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-24 10:10 [PATCH] dvb: Allow MAC addresses to be mapped to stable device names with udev David Howells
2018-10-30 14:03 ` Mauro Carvalho Chehab
2018-10-30 22:32   ` Sean Young
2018-10-31  0:35     ` Mauro Carvalho Chehab
2018-10-31  8:43       ` Sean Young
2018-10-31 10:57       ` David Howells
2018-10-31 10:36   ` David Howells
2018-10-31 10:49     ` Sean Young
2018-10-31 11:01     ` David Howells
2018-10-31 11:19     ` David Howells [this message]
2018-10-31 15:51     ` David Howells
2018-10-31 16:12       ` Mauro Carvalho Chehab
2018-10-31 16:13       ` Sean Young
2018-10-31 16:28         ` Mauro Carvalho Chehab
2018-10-31 19:10       ` David Howells

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=12108.1540984768@warthog.procyon.org.uk \
    --to=dhowells@redhat.com \
    --cc=brad@nextdimension.cc \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab+samsung@kernel.org \
    --cc=mchehab@kernel.org \
    --cc=mkrufky@linuxtv.org \
    --cc=sean@mess.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.