From: Jochen Friedrich <jochen@scram.de>
To: Alexey Klimov <klimov.linux@gmail.com>
Cc: linux-media@vger.kernel.org, Antti Palosaari <crope@iki.fi>
Subject: Re: [PATCHv2] Add Freescale MC44S803 tuner driver
Date: Thu, 15 Jan 2009 18:52:50 +0100 [thread overview]
Message-ID: <496F77F2.70906@scram.de> (raw)
In-Reply-To: <208cbae30901141714h749086b3vc5e5ae243d81f88a@mail.gmail.com>
Hi Alexey,
>> +/* This functions tries to identify a MC44S803 tuner by reading the ID
>> + register. This is hasty. */
>> +struct dvb_frontend *mc44s803_attach(struct dvb_frontend *fe,
>> + struct i2c_adapter *i2c, struct mc44s803_config *cfg)
>> +{
>> + struct mc44s803_priv *priv = NULL;
>
> Do you really need *priv set to NULL here ?
No, it's not needed. Will remove.
>> + priv = kzalloc(sizeof(struct mc44s803_priv), GFP_KERNEL);
>> + if (priv == NULL)
>> + return NULL;
>
> Maybe return -ENOMEM; ? I don't sure about return NULL, may be your
> variant is right.
NULL is correct here. All tuners are supposed to return NULL on an error during attach().
>> + if (id != 0x14) {
>> + printk(KERN_ERROR "MC44S803: unsupported ID "
>
> You pass the name of driver directly to printk messages in few places.
> Is it better to use such approach:
> #define MC44S803_DRIVER_NAME "mc44s803"
>
> printk (KERN_ERR MC44S803_DRIVER_NAME ": something\n");
>
> ?
> What do you think?
You're right.
Thanks for your comments.
Jochen
prev parent reply other threads:[~2009-01-15 17:52 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-01-14 18:04 [PATCHv2] Add Freescale MC44S803 tuner driver Jochen Friedrich
2009-01-14 18:14 ` Antti Palosaari
2009-01-14 18:25 ` Jochen Friedrich
2009-01-15 1:14 ` Alexey Klimov
2009-01-15 17:52 ` Jochen Friedrich [this message]
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=496F77F2.70906@scram.de \
--to=jochen@scram.de \
--cc=crope@iki.fi \
--cc=klimov.linux@gmail.com \
--cc=linux-media@vger.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.