All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Tycho Lürsen" <tycholursen@gmail.com>
To: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Cc: "Linux Media Mailing List" <linux-media@vger.kernel.org>,
	"Mauro Carvalho Chehab" <mchehab@infradead.org>,
	"Antti Palosaari" <crope@iki.fi>,
	"Matthias Schwarzott" <zzam@gentoo.org>,
	"Hans Verkuil" <hans.verkuil@cisco.com>,
	"Rafael Lourenço de Lima Chehab" <chehabrafael@gmail.com>
Subject: Re: [PATCH] [media] use a function for DVB media controller register
Date: Mon, 02 Mar 2015 18:37:07 +0100	[thread overview]
Message-ID: <54F49FC3.9030206@gmail.com> (raw)
In-Reply-To: <20150302140614.70300466@recife.lan>

Hi Mauro,
Op 02-03-15 om 18:06 schreef Mauro Carvalho Chehab:
> Em Mon, 02 Mar 2015 17:54:53 +0100
> Tycho Lürsen <tycholursen@gmail.com> escreveu:
>
>> Hi Mauro,
>> Op 02-03-15 om 15:31 schreef Mauro Carvalho Chehab:
>>> This is really a simple function, but using it avoids to have
>>> if's inside the drivers.
>>>
>>> Also, the kABI becomes a little more clearer.
>>>
>>> This shouldn't generate any overhead, and the type check
>>> will happen when compiling with MC DVB enabled.
>>>
>>> So, let's do it.
>>>
>>> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
>>>
>>> diff --git a/drivers/media/common/siano/smsdvb-main.c b/drivers/media/common/siano/smsdvb-main.c
>>> index c739725ca7ee..367b8e77feb8 100644
>>> --- a/drivers/media/common/siano/smsdvb-main.c
>>> +++ b/drivers/media/common/siano/smsdvb-main.c
>>> @@ -1104,9 +1104,7 @@ static int smsdvb_hotplug(struct smscore_device_t *coredev,
>>>    		pr_err("dvb_register_adapter() failed %d\n", rc);
>>>    		goto adapter_error;
>>>    	}
>>> -#ifdef CONFIG_MEDIA_CONTROLLER_DVB
>>> -	client->adapter.mdev = coredev->media_dev;
>>> -#endif
>>> +	dvb_register_media_controller(&client->adapter, coredev->media_dev);
>>>    
>>>    	/* init dvb demux */
>>>    	client->demux.dmx.capabilities = DMX_TS_FILTERING;
>>> diff --git a/drivers/media/dvb-core/dvbdev.h b/drivers/media/dvb-core/dvbdev.h
>>> index 556c9e9d1d4e..12629b8ecb0c 100644
>>> --- a/drivers/media/dvb-core/dvbdev.h
>>> +++ b/drivers/media/dvb-core/dvbdev.h
>>> @@ -125,8 +125,15 @@ extern void dvb_unregister_device (struct dvb_device *dvbdev);
>>>    
>>>    #ifdef CONFIG_MEDIA_CONTROLLER_DVB
>>>    void dvb_create_media_graph(struct dvb_adapter *adap);
>>> +static inline void dvb_register_media_controller(struct dvb_adapter *adap,
>>> +						 struct media_device *mdev)
>>> +{
>>> +	adap->mdev = mdev;
>>> +}
>>> +
>>>    #else
>>>    static inline void dvb_create_media_graph(struct dvb_adapter *adap) {}
>>> +#define dvb_register_media_controller(a, b) {}
>>>    #endif
>> Does "#define dvb_register_media_controller(a, b) {}" restrict the
>> number of registerd controllers in any way?
>> I mean, I've got a couple of TBS quad adapters, 4 tuner and 4 demod
>> chips on each card. Will they still work with this change?
> No. What the above define does is to replace the function call by nothing,
> if MEDIA_CONTROLLER_DVB is not set.
>
> Neither it or the current patches for the media controller on DVB should
> affect the TBS quad adapters. If you're having some regressions with it,
> please report.
>
> Regards,
> Mauro
Thanks for your reply, I will test this for regression as soon as it 
hits the master branch.

Regards,
Tycho.


  reply	other threads:[~2015-03-02 17:37 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-02 14:31 [PATCH] [media] use a function for DVB media controller register Mauro Carvalho Chehab
2015-03-02 16:54 ` Tycho Lürsen
2015-03-02 17:06   ` Mauro Carvalho Chehab
2015-03-02 17:37     ` Tycho Lürsen [this message]
2015-03-02 18:25       ` Tycho Lürsen

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=54F49FC3.9030206@gmail.com \
    --to=tycholursen@gmail.com \
    --cc=chehabrafael@gmail.com \
    --cc=crope@iki.fi \
    --cc=hans.verkuil@cisco.com \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@infradead.org \
    --cc=mchehab@osg.samsung.com \
    --cc=zzam@gentoo.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.