lkml.org 
[lkml]   [2022]   [Sep]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v5 5/6] Input: Add tps65219 interrupt driven powerbutton
Hi Jerome,

On Tue, Sep 27, 2022 at 10:35:19AM +0200, Jerome Neanne wrote:
> +static int tps65219_pb_probe(struct platform_device *pdev)
> +{
> + struct tps65219 *tps = dev_get_drvdata(pdev->dev.parent);
> + struct device *dev = &pdev->dev;
> + struct tps65219_pwrbutton *pwr;
> + struct input_dev *idev;
> + int error;
> + int push_irq;
> + int release_irq;
> +
> + pwr = devm_kzalloc(dev, sizeof(*pwr), GFP_KERNEL);
> + if (!pwr)
> + return -ENOMEM;
> +
> + idev = devm_input_allocate_device(dev);
> + if (!idev)
> + return -ENOMEM;
> +
> + idev->name = pdev->name;
> + snprintf(pwr->phys, sizeof(pwr->phys), "%s/input0",
> + pdev->name);
> + idev->phys = pwr->phys;
> + idev->dev.parent = dev;

As I mentioned in my previous email, this assignment is not needed given
that devm_input_allocate_device() is used. Otherwise:

Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>

Please feel free to merge through MFD tree.

Thanks.

--
Dmitry

\
 
 \ /
  Last update: 2022-09-27 17:54    [W:0.046 / U:0.396 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site