Skip to content

Commit 336d8cd

Browse files
committed
Merge tag 'extcon-next-for-6.10' of git://git.kernel.org/pub/scm/linux/kernel/git/chanwoo/extcon into char-misc-next
Chanwoo writes: Update extcon next for v6.10 Detailed description for this pull request: - Covert to platform remove callback with .remove_new ops : extcon-adc-jack.c/extcon-intel-cht-wc.c/extcon-intel-mrfld.c : extcon-max3355.c/extcon-max77843.c/extcon-usb-gpio.c/extcon-usbc-cros-ec.c - Switch to use dev_err_prove() on extcon-intel-mrfld.c - Remove unused of_gpio.h on extcon-rtk-type-c.c - Select IRQ_DOMAIN config instead of dependency for extcon-max8997.c - Use returned error instead of -ENOMEM for extcon-intel-mrfld.c * tag 'extcon-next-for-6.10' of git://git.kernel.org/pub/scm/linux/kernel/git/chanwoo/extcon: extcon: adc-jack: Document missing struct members extcon: realtek: Remove unused of_gpio.h extcon: usbc-cros-ec: Convert to platform remove callback returning void extcon: usb-gpio: Convert to platform remove callback returning void extcon: max77843: Convert to platform remove callback returning void extcon: max3355: Convert to platform remove callback returning void extcon: intel-mrfld: Convert to platform remove callback returning void extcon: intel-cht-wc: Convert to platform remove callback returning void extcon: adc-jack: Convert to platform remove callback returning void extcon: intel-mrfld: Don't shadow error from devm_extcon_dev_allocate() extcon: max8997: select IRQ_DOMAIN instead of depending on it extcon: intel-mrfld: Switch to use dev_err_probe()
2 parents ed63ba1 + 3e8e45b commit 336d8cd

File tree

9 files changed

+25
-43
lines changed

9 files changed

+25
-43
lines changed

drivers/extcon/Kconfig

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,8 @@ config EXTCON_MAX77843
116116

117117
config EXTCON_MAX8997
118118
tristate "Maxim MAX8997 EXTCON Support"
119-
depends on MFD_MAX8997 && IRQ_DOMAIN
119+
depends on MFD_MAX8997
120+
select IRQ_DOMAIN
120121
help
121122
If you say yes here you get support for the MUIC device of
122123
Maxim MAX8997 PMIC. The MAX8997 MUIC is a USB port accessory

drivers/extcon/extcon-adc-jack.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626

2727
/**
2828
* struct adc_jack_data - internal data for adc_jack device driver
29+
* @dev: The device structure associated with the adc_jack.
2930
* @edev: extcon device.
3031
* @cable_names: list of supported cables.
3132
* @adc_conditions: list of adc value conditions.
@@ -35,6 +36,7 @@
3536
* handling at handling_delay jiffies.
3637
* @handler: extcon event handler called by interrupt handler.
3738
* @chan: iio channel being queried.
39+
* @wakeup_source: Indicates if the device can wake up the system.
3840
*/
3941
struct adc_jack_data {
4042
struct device *dev;
@@ -158,14 +160,12 @@ static int adc_jack_probe(struct platform_device *pdev)
158160
return 0;
159161
}
160162

161-
static int adc_jack_remove(struct platform_device *pdev)
163+
static void adc_jack_remove(struct platform_device *pdev)
162164
{
163165
struct adc_jack_data *data = platform_get_drvdata(pdev);
164166

165167
free_irq(data->irq, data);
166168
cancel_work_sync(&data->handler.work);
167-
168-
return 0;
169169
}
170170

171171
#ifdef CONFIG_PM_SLEEP
@@ -196,7 +196,7 @@ static SIMPLE_DEV_PM_OPS(adc_jack_pm_ops,
196196

197197
static struct platform_driver adc_jack_driver = {
198198
.probe = adc_jack_probe,
199-
.remove = adc_jack_remove,
199+
.remove_new = adc_jack_remove,
200200
.driver = {
201201
.name = "adc-jack",
202202
.pm = &adc_jack_pm_ops,

drivers/extcon/extcon-intel-cht-wc.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -617,13 +617,11 @@ static int cht_wc_extcon_probe(struct platform_device *pdev)
617617
return ret;
618618
}
619619

620-
static int cht_wc_extcon_remove(struct platform_device *pdev)
620+
static void cht_wc_extcon_remove(struct platform_device *pdev)
621621
{
622622
struct cht_wc_extcon_data *ext = platform_get_drvdata(pdev);
623623

624624
cht_wc_extcon_sw_control(ext, false);
625-
626-
return 0;
627625
}
628626

629627
static const struct platform_device_id cht_wc_extcon_table[] = {
@@ -634,7 +632,7 @@ MODULE_DEVICE_TABLE(platform, cht_wc_extcon_table);
634632

635633
static struct platform_driver cht_wc_extcon_driver = {
636634
.probe = cht_wc_extcon_probe,
637-
.remove = cht_wc_extcon_remove,
635+
.remove_new = cht_wc_extcon_remove,
638636
.id_table = cht_wc_extcon_table,
639637
.driver = {
640638
.name = "cht_wcove_pwrsrc",

drivers/extcon/extcon-intel-mrfld.c

Lines changed: 9 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -214,27 +214,21 @@ static int mrfld_extcon_probe(struct platform_device *pdev)
214214

215215
data->edev = devm_extcon_dev_allocate(dev, mrfld_extcon_cable);
216216
if (IS_ERR(data->edev))
217-
return -ENOMEM;
217+
return PTR_ERR(data->edev);
218218

219219
ret = devm_extcon_dev_register(dev, data->edev);
220-
if (ret < 0) {
221-
dev_err(dev, "can't register extcon device: %d\n", ret);
222-
return ret;
223-
}
220+
if (ret < 0)
221+
return dev_err_probe(dev, ret, "can't register extcon device\n");
224222

225223
ret = devm_request_threaded_irq(dev, irq, NULL, mrfld_extcon_interrupt,
226224
IRQF_ONESHOT | IRQF_SHARED, pdev->name,
227225
data);
228-
if (ret) {
229-
dev_err(dev, "can't register IRQ handler: %d\n", ret);
230-
return ret;
231-
}
226+
if (ret)
227+
return dev_err_probe(dev, ret, "can't register IRQ handler\n");
232228

233229
ret = regmap_read(regmap, BCOVE_ID, &id);
234-
if (ret) {
235-
dev_err(dev, "can't read PMIC ID: %d\n", ret);
236-
return ret;
237-
}
230+
if (ret)
231+
return dev_err_probe(dev, ret, "can't read PMIC ID\n");
238232

239233
data->id = id;
240234

@@ -263,13 +257,11 @@ static int mrfld_extcon_probe(struct platform_device *pdev)
263257
return 0;
264258
}
265259

266-
static int mrfld_extcon_remove(struct platform_device *pdev)
260+
static void mrfld_extcon_remove(struct platform_device *pdev)
267261
{
268262
struct mrfld_extcon_data *data = platform_get_drvdata(pdev);
269263

270264
mrfld_extcon_sw_control(data, false);
271-
272-
return 0;
273265
}
274266

275267
static const struct platform_device_id mrfld_extcon_id_table[] = {
@@ -283,7 +275,7 @@ static struct platform_driver mrfld_extcon_driver = {
283275
.name = "mrfld_bcove_pwrsrc",
284276
},
285277
.probe = mrfld_extcon_probe,
286-
.remove = mrfld_extcon_remove,
278+
.remove_new = mrfld_extcon_remove,
287279
.id_table = mrfld_extcon_id_table,
288280
};
289281
module_platform_driver(mrfld_extcon_driver);

drivers/extcon/extcon-max3355.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -112,13 +112,11 @@ static int max3355_probe(struct platform_device *pdev)
112112
return 0;
113113
}
114114

115-
static int max3355_remove(struct platform_device *pdev)
115+
static void max3355_remove(struct platform_device *pdev)
116116
{
117117
struct max3355_data *data = platform_get_drvdata(pdev);
118118

119119
gpiod_set_value_cansleep(data->shdn_gpiod, 0);
120-
121-
return 0;
122120
}
123121

124122
static const struct of_device_id max3355_match_table[] = {
@@ -129,7 +127,7 @@ MODULE_DEVICE_TABLE(of, max3355_match_table);
129127

130128
static struct platform_driver max3355_driver = {
131129
.probe = max3355_probe,
132-
.remove = max3355_remove,
130+
.remove_new = max3355_remove,
133131
.driver = {
134132
.name = "extcon-max3355",
135133
.of_match_table = max3355_match_table,

drivers/extcon/extcon-max77843.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -928,16 +928,14 @@ static int max77843_muic_probe(struct platform_device *pdev)
928928
return ret;
929929
}
930930

931-
static int max77843_muic_remove(struct platform_device *pdev)
931+
static void max77843_muic_remove(struct platform_device *pdev)
932932
{
933933
struct max77843_muic_info *info = platform_get_drvdata(pdev);
934934
struct max77693_dev *max77843 = info->max77843;
935935

936936
cancel_work_sync(&info->irq_work);
937937
regmap_del_irq_chip(max77843->irq, max77843->irq_data_muic);
938938
i2c_unregister_device(max77843->i2c_muic);
939-
940-
return 0;
941939
}
942940

943941
static const struct platform_device_id max77843_muic_id[] = {
@@ -958,7 +956,7 @@ static struct platform_driver max77843_muic_driver = {
958956
.of_match_table = of_max77843_muic_dt_match,
959957
},
960958
.probe = max77843_muic_probe,
961-
.remove = max77843_muic_remove,
959+
.remove_new = max77843_muic_remove,
962960
.id_table = max77843_muic_id,
963961
};
964962

drivers/extcon/extcon-rtk-type-c.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
#include <linux/of.h>
1414
#include <linux/of_address.h>
1515
#include <linux/of_irq.h>
16-
#include <linux/of_gpio.h>
1716
#include <linux/io.h>
1817
#include <linux/interrupt.h>
1918
#include <linux/syscalls.h>

drivers/extcon/extcon-usb-gpio.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -193,14 +193,12 @@ static int usb_extcon_probe(struct platform_device *pdev)
193193
return 0;
194194
}
195195

196-
static int usb_extcon_remove(struct platform_device *pdev)
196+
static void usb_extcon_remove(struct platform_device *pdev)
197197
{
198198
struct usb_extcon_info *info = platform_get_drvdata(pdev);
199199

200200
cancel_delayed_work_sync(&info->wq_detcable);
201201
device_init_wakeup(&pdev->dev, false);
202-
203-
return 0;
204202
}
205203

206204
#ifdef CONFIG_PM_SLEEP
@@ -281,7 +279,7 @@ MODULE_DEVICE_TABLE(platform, usb_extcon_platform_ids);
281279

282280
static struct platform_driver usb_extcon_driver = {
283281
.probe = usb_extcon_probe,
284-
.remove = usb_extcon_remove,
282+
.remove_new = usb_extcon_remove,
285283
.driver = {
286284
.name = "extcon-usb-gpio",
287285
.pm = &usb_extcon_pm_ops,

drivers/extcon/extcon-usbc-cros-ec.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -480,14 +480,12 @@ static int extcon_cros_ec_probe(struct platform_device *pdev)
480480
return ret;
481481
}
482482

483-
static int extcon_cros_ec_remove(struct platform_device *pdev)
483+
static void extcon_cros_ec_remove(struct platform_device *pdev)
484484
{
485485
struct cros_ec_extcon_info *info = platform_get_drvdata(pdev);
486486

487487
blocking_notifier_chain_unregister(&info->ec->event_notifier,
488488
&info->notifier);
489-
490-
return 0;
491489
}
492490

493491
#ifdef CONFIG_PM_SLEEP
@@ -531,7 +529,7 @@ static struct platform_driver extcon_cros_ec_driver = {
531529
.of_match_table = of_match_ptr(extcon_cros_ec_of_match),
532530
.pm = DEV_PM_OPS,
533531
},
534-
.remove = extcon_cros_ec_remove,
532+
.remove_new = extcon_cros_ec_remove,
535533
.probe = extcon_cros_ec_probe,
536534
};
537535

0 commit comments

Comments
 (0)