Skip to content

Commit 294fb2c

Browse files
krzkLee Jones
authored andcommitted
mfd: sec: Remove unused device_type in platform data
The 'device_type' field of platform data structure is not used and can be safely dropped. Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
1 parent 12e1a41 commit 294fb2c

2 files changed

Lines changed: 1 addition & 5 deletions

File tree

‎drivers/mfd/sec-core.c‎

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -318,7 +318,6 @@ static int sec_pmic_probe(struct i2c_client *i2c,
318318
struct sec_platform_data *pdata;
319319
const struct mfd_cell *sec_devs;
320320
struct sec_pmic_dev *sec_pmic;
321-
unsigned long device_type;
322321
int ret, num_sec_devs;
323322

324323
sec_pmic = devm_kzalloc(&i2c->dev, sizeof(struct sec_pmic_dev),
@@ -330,16 +329,14 @@ static int sec_pmic_probe(struct i2c_client *i2c,
330329
sec_pmic->dev = &i2c->dev;
331330
sec_pmic->i2c = i2c;
332331
sec_pmic->irq = i2c->irq;
333-
device_type = (unsigned long)of_device_get_match_data(sec_pmic->dev);
334332

335333
pdata = sec_pmic_i2c_parse_dt_pdata(sec_pmic->dev);
336334
if (IS_ERR(pdata)) {
337335
ret = PTR_ERR(pdata);
338336
return ret;
339337
}
340-
pdata->device_type = device_type;
341338

342-
sec_pmic->device_type = pdata->device_type;
339+
sec_pmic->device_type = (unsigned long)of_device_get_match_data(sec_pmic->dev);
343340
sec_pmic->irq_base = pdata->irq_base;
344341
sec_pmic->wakeup = pdata->wakeup;
345342
sec_pmic->pdata = pdata;

‎include/linux/mfd/samsung/core.h‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,6 @@ int sec_irq_resume(struct sec_pmic_dev *sec_pmic);
8181
struct sec_platform_data {
8282
struct sec_regulator_data *regulators;
8383
struct sec_opmode_data *opmode;
84-
int device_type;
8584
int num_regulators;
8685

8786
int irq_base;

0 commit comments

Comments
 (0)