lkml.org 
[lkml]   [2018]   [Nov]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 1/2] mfd: ti_am335x_tscadc: Provide unique name for child mfd cells
Date
Provide unique names for child mfd cells, this is required in order to
support registering of multiple instances of same ti_am335x_tscadc IP.

Signed-off-by: Vignesh R <vigneshr@ti.com>
---
drivers/mfd/ti_am335x_tscadc.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/mfd/ti_am335x_tscadc.c b/drivers/mfd/ti_am335x_tscadc.c
index c2d47d78705b..ee08af34f81d 100644
--- a/drivers/mfd/ti_am335x_tscadc.c
+++ b/drivers/mfd/ti_am335x_tscadc.c
@@ -248,7 +248,8 @@ static int ti_tscadc_probe(struct platform_device *pdev)
if (tsc_wires > 0) {
tscadc->tsc_cell = tscadc->used_cells;
cell = &tscadc->cells[tscadc->used_cells++];
- cell->name = "TI-am335x-tsc";
+ cell->name = devm_kasprintf(&pdev->dev, GFP_KERNEL, "%s:%s",
+ dev_name(&pdev->dev), "tsc");
cell->of_compatible = "ti,am3359-tsc";
cell->platform_data = &tscadc;
cell->pdata_size = sizeof(tscadc);
@@ -258,7 +259,8 @@ static int ti_tscadc_probe(struct platform_device *pdev)
if (adc_channels > 0) {
tscadc->adc_cell = tscadc->used_cells;
cell = &tscadc->cells[tscadc->used_cells++];
- cell->name = "TI-am335x-adc";
+ cell->name = devm_kasprintf(&pdev->dev, GFP_KERNEL, "%s:%s",
+ dev_name(&pdev->dev), "adc");
cell->of_compatible = "ti,am3359-adc";
cell->platform_data = &tscadc;
cell->pdata_size = sizeof(tscadc);
--
2.19.1
\
 
 \ /
  Last update: 2018-11-19 07:43    [W:0.104 / U:0.760 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site