Re: [patch 2.6.28-rc6-davinci1 5/6] dm355evm input driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Dave,

only one comment below.

On Sun, Dec 07, 2008 at 11:59:50AM -0800, David Brownell wrote:
> +static int __devinit dm355evm_keys_probe(struct platform_device *pdev)
> +{
> +	struct dm355evm_keys	*keys;
> +	int			status = -ENOMEM;
> +	struct input_dev	*input;
> +	int			i;
> +
> +	/* allocate instance struct */
> +	keys = kzalloc(sizeof *keys, GFP_KERNEL);
> +	if (!keys)
> +		goto fail0;
> +	platform_set_drvdata(pdev, keys);
> +	keys->pdev = pdev;

you could be holding only the device pointer.

	keys->dev = &pdev->dev;

then, if you really happen to need the pdev pointer you can use

to_platform_device(keys->dev);

-- 
balbi
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Media Devel]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Linux Wireless Networking]     [Linux Omap]

  Powered by Linux