From: Alan Cox <alan@lxorguk.ukuu.org.uk>
To: pavan_savoy@ti.com
Cc: Greg KH <gregkh@suse.de>, Marcel Holtmann <marcel@holtmann.org>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] drivers:staging: sources for ST core
Date: Thu, 1 Apr 2010 10:20:05 +0100 [thread overview]
Message-ID: <20100401102005.4fba7cc2@lxorguk.ukuu.org.uk> (raw)
In-Reply-To: <836055.3581.qm@web94915.mail.in2.yahoo.com>
> +/*
> + * function to return whether the firmware response was proper
> + * in case of error don't complete so that waiting for proper
> + * response times out
> + */
> +void validate_firmware_response(struct sk_buff *skb)
> +{
> + if (unlikely(skb->data[5] != 0)) {
> + pr_err("no proper response during fw download");
> + pr_err("data6 %x", skb->data[5]);
In this driver you do know the device so you need to be using dev_ and
passing around dev (or something that gives you dev).
> +static int kim_probe(struct platform_device *pdev)
> +{
> + long status;
> + long proto;
> + long *gpios = pdev->dev.platform_data;
> +
> + status = st_core_init(&kim_gdata->core_data);
I would expect any truely global data to be configured in the module init
and then device specific data you want to do something like this
kim_data = kzalloc(sizeof(something), GFP_KERNEL);
..
kim_data_init(&pdev->dev, kim_data);
dev_set_drvdata(&pdev->dev, kim_data);
Elsewhere you can now do
kim_data = dev_get_drvdata(&pdev->dev);
to get it back
next prev parent reply other threads:[~2010-04-01 9:16 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-31 19:27 Pavan Savoy
2010-03-31 20:24 ` Greg KH
2010-03-31 23:57 ` Pavan Savoy
2010-04-01 9:20 ` Alan Cox [this message]
-- strict thread matches above, loose matches on Subject: below --
2010-04-27 16:15 Pavan Savoy
2010-04-08 18:16 New ldisc for WiLink7.0 pavan_savoy
2010-04-08 18:16 ` [PATCH] serial: TTY: new ldiscs for staging pavan_savoy
2010-04-08 18:16 ` [PATCH] drivers:staging: sources for ST core pavan_savoy
2010-04-13 15:06 ` Pavan Savoy
2010-04-13 15:12 ` Alan Cox
2010-04-19 18:37 ` Pavan Savoy
2010-04-26 21:24 ` Pavan Savoy
2010-04-26 22:03 ` Alan Cox
2010-04-26 22:06 ` Pavan Savoy
2010-04-01 17:20 Pavan Savoy
2010-04-01 22:43 ` Pavan Savoy
2010-04-01 23:27 ` Alan Cox
2010-04-05 16:18 ` Pavan Savoy
2010-03-30 22:50 Pavan Savoy
2010-03-31 17:30 ` Greg KH
2010-03-31 18:02 ` Pavan Savoy
2010-03-31 18:19 ` Greg KH
2010-03-25 23:20 [v4] New ldisc for WiLink7.0 pavan_savoy
2010-03-25 23:20 ` [PATCH] serial: TTY: new ldiscs for staging pavan_savoy
2010-03-25 23:20 ` [PATCH] drivers:staging: sources for ST core pavan_savoy
2010-03-30 11:22 ` Alan Cox
2010-03-30 15:53 ` Pavan Savoy
2010-03-30 20:38 ` Greg KH
2010-03-30 21:05 ` Pavan Savoy
2010-03-30 21:47 ` Greg KH
2010-03-31 2:24 ` Joe Perches
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=20100401102005.4fba7cc2@lxorguk.ukuu.org.uk \
--to=alan@lxorguk.ukuu.org.uk \
--cc=gregkh@suse.de \
--cc=linux-kernel@vger.kernel.org \
--cc=marcel@holtmann.org \
--cc=pavan_savoy@ti.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®