mirror of
https://github.com/torvalds/linux.git
synced 2024-11-29 07:31:29 +00:00
Input: twl4030-vibra - drop legacy, non DT boot support
Legacy or non DT boot is no longer possible on systems where the tw4030/5030 is used. Drop the support for handling legacy pdata. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@gmail.com> Link: https://lore.kernel.org/r/20220616153323.29464-1-peter.ujfalusi@gmail.com Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
This commit is contained in:
parent
87d3d1b140
commit
6dc0a438f9
@ -163,14 +163,10 @@ static int __maybe_unused twl4030_vibra_resume(struct device *dev)
|
||||
static SIMPLE_DEV_PM_OPS(twl4030_vibra_pm_ops,
|
||||
twl4030_vibra_suspend, twl4030_vibra_resume);
|
||||
|
||||
static bool twl4030_vibra_check_coexist(struct twl4030_vibra_data *pdata,
|
||||
struct device_node *parent)
|
||||
static bool twl4030_vibra_check_coexist(struct device_node *parent)
|
||||
{
|
||||
struct device_node *node;
|
||||
|
||||
if (pdata && pdata->coexist)
|
||||
return true;
|
||||
|
||||
node = of_get_child_by_name(parent, "codec");
|
||||
if (node) {
|
||||
of_node_put(node);
|
||||
@ -182,13 +178,12 @@ static bool twl4030_vibra_check_coexist(struct twl4030_vibra_data *pdata,
|
||||
|
||||
static int twl4030_vibra_probe(struct platform_device *pdev)
|
||||
{
|
||||
struct twl4030_vibra_data *pdata = dev_get_platdata(&pdev->dev);
|
||||
struct device_node *twl4030_core_node = pdev->dev.parent->of_node;
|
||||
struct vibra_info *info;
|
||||
int ret;
|
||||
|
||||
if (!pdata && !twl4030_core_node) {
|
||||
dev_dbg(&pdev->dev, "platform_data not available\n");
|
||||
if (!twl4030_core_node) {
|
||||
dev_dbg(&pdev->dev, "twl4030 OF node is missing\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
@ -197,7 +192,7 @@ static int twl4030_vibra_probe(struct platform_device *pdev)
|
||||
return -ENOMEM;
|
||||
|
||||
info->dev = &pdev->dev;
|
||||
info->coexist = twl4030_vibra_check_coexist(pdata, twl4030_core_node);
|
||||
info->coexist = twl4030_vibra_check_coexist(twl4030_core_node);
|
||||
INIT_WORK(&info->play_work, vibra_play_work);
|
||||
|
||||
info->input_dev = devm_input_allocate_device(&pdev->dev);
|
||||
|
Loading…
Reference in New Issue
Block a user