[Intel-gfx] [PATCH 1/4] drm/i915: Add audio hotplug info struct
Takashi Iwai
tiwai at suse.de
Wed Jul 22 01:55:55 PDT 2015
On Wed, 22 Jul 2015 10:50:03 +0200,
David Henningsson wrote:
>
> >> struct i915_audio_component {
> >> struct device *dev;
> >> + struct hdac_bus *hdac_bus;
> >
> > If we want to be more generic, using a struct device would be better,
> > e.g.
> > struct device *audio_dev;
>
> Does this work? If we want to have the hdac_bus.dev ptr instead of a
> hdac_bus ptr, there does not seem to be an obvious way to go from the
> audio_dev back to the hdac_bus struct (as snd_hdac_bus_init takes an
> arbitrary dev pointer).
Hrm, right, currently it's not straightforward. Scratch the idea,
then.
> >> + void (*hotplug_notify)(struct hdac_bus *, const struct i915_audio_hotplug_info *);
> >> + } *cb_ops;
> >
> > cb_ops doesn't sound intuitive. Any better name?
>
> I was thinking of it as "callback ops", i e, calls that go in the
> reverse direction compared to the already existing "ops".
>
> But if we call the device "audio_dev" as you suggested above, then maybe
> "audio_ops" would be nice and symmetric?
Yes, it sounds better.
Takashi
More information about the Intel-gfx
mailing list