* [PATCH] Input: twl6040_vibra - remove unneeded check for CONFIG_OF
@ 2014-01-04 8:11 Dmitry Torokhov
2014-01-04 10:30 ` David Herrmann
0 siblings, 1 reply; 2+ messages in thread
From: Dmitry Torokhov @ 2014-01-04 8:11 UTC (permalink / raw)
To: linux-input; +Cc: Peter Ujfalusi, linux-kernel
Since the driver requires DT now we do not need to check if CONFIG_OF is
defined.
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
---
drivers/input/misc/twl6040-vibra.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/drivers/input/misc/twl6040-vibra.c b/drivers/input/misc/twl6040-vibra.c
index 89bca76..77dc23b 100644
--- a/drivers/input/misc/twl6040-vibra.c
+++ b/drivers/input/misc/twl6040-vibra.c
@@ -258,17 +258,14 @@ static SIMPLE_DEV_PM_OPS(twl6040_vibra_pm_ops, twl6040_vibra_suspend, NULL);
static int twl6040_vibra_probe(struct platform_device *pdev)
{
struct device *twl6040_core_dev = pdev->dev.parent;
- struct device_node *twl6040_core_node = NULL;
+ struct device_node *twl6040_core_node;
struct vibra_info *info;
int vddvibl_uV = 0;
int vddvibr_uV = 0;
int ret;
-#ifdef CONFIG_OF
twl6040_core_node = of_find_node_by_name(twl6040_core_dev->of_node,
"vibra");
-#endif
-
if (!twl6040_core_node) {
dev_err(&pdev->dev, "parent of node is missing?\n");
return -EINVAL;
--
1.8.4.2
--
Dmitry
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] Input: twl6040_vibra - remove unneeded check for CONFIG_OF
2014-01-04 8:11 [PATCH] Input: twl6040_vibra - remove unneeded check for CONFIG_OF Dmitry Torokhov
@ 2014-01-04 10:30 ` David Herrmann
0 siblings, 0 replies; 2+ messages in thread
From: David Herrmann @ 2014-01-04 10:30 UTC (permalink / raw)
To: Dmitry Torokhov; +Cc: open list:HID CORE LAYER, Peter Ujfalusi, linux-kernel
Hi
On Sat, Jan 4, 2014 at 9:11 AM, Dmitry Torokhov
<dmitry.torokhov@gmail.com> wrote:
> Since the driver requires DT now we do not need to check if CONFIG_OF is
> defined.
>
> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
> ---
> drivers/input/misc/twl6040-vibra.c | 5 +----
> 1 file changed, 1 insertion(+), 4 deletions(-)
>
> diff --git a/drivers/input/misc/twl6040-vibra.c b/drivers/input/misc/twl6040-vibra.c
> index 89bca76..77dc23b 100644
> --- a/drivers/input/misc/twl6040-vibra.c
> +++ b/drivers/input/misc/twl6040-vibra.c
> @@ -258,17 +258,14 @@ static SIMPLE_DEV_PM_OPS(twl6040_vibra_pm_ops, twl6040_vibra_suspend, NULL);
> static int twl6040_vibra_probe(struct platform_device *pdev)
> {
> struct device *twl6040_core_dev = pdev->dev.parent;
> - struct device_node *twl6040_core_node = NULL;
> + struct device_node *twl6040_core_node;
> struct vibra_info *info;
> int vddvibl_uV = 0;
> int vddvibr_uV = 0;
> int ret;
>
> -#ifdef CONFIG_OF
> twl6040_core_node = of_find_node_by_name(twl6040_core_dev->of_node,
> "vibra");
If CONFIG_OF=n, of_find_node_by_name() always returns NULL. See
include/linux/of.h. So no need to depend on DT.
Reviewed-by: David Herrmann <dh.herrmann@gmail.com>
Thanks
David
> -#endif
> -
> if (!twl6040_core_node) {
> dev_err(&pdev->dev, "parent of node is missing?\n");
> return -EINVAL;
> --
> 1.8.4.2
>
>
> --
> Dmitry
> --
> To unsubscribe from this list: send the line "unsubscribe linux-input" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-01-04 10:30 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-01-04 8:11 [PATCH] Input: twl6040_vibra - remove unneeded check for CONFIG_OF Dmitry Torokhov
2014-01-04 10:30 ` David Herrmann
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).