hc
2023-12-11 d2ccde1c8e90d38cee87a1b0309ad2827f3fd30d
kernel/drivers/pwm/pwm-samsung.c
....@@ -1,3 +1,4 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /*
23 * Copyright (c) 2007 Ben Dooks
34 * Copyright (c) 2008 Simtec Electronics
....@@ -6,10 +7,6 @@
67 * Copyright (c) 2017 Samsung Electronics Co., Ltd.
78 *
89 * PWM driver for Samsung SoCs
9
- *
10
- * This program is free software; you can redistribute it and/or modify
11
- * it under the terms of the GNU General Public License as published by
12
- * the Free Software Foundation; either version 2 of the License.
1310 */
1411
1512 #include <linux/bitops.h>
....@@ -226,7 +223,7 @@
226223 return -EINVAL;
227224 }
228225
229
- our_chan = devm_kzalloc(chip->dev, sizeof(*our_chan), GFP_KERNEL);
226
+ our_chan = kzalloc(sizeof(*our_chan), GFP_KERNEL);
230227 if (!our_chan)
231228 return -ENOMEM;
232229
....@@ -237,7 +234,7 @@
237234
238235 static void pwm_samsung_free(struct pwm_chip *chip, struct pwm_device *pwm)
239236 {
240
- devm_kfree(chip->dev, pwm_get_chip_data(pwm));
237
+ kfree(pwm_get_chip_data(pwm));
241238 }
242239
243240 static int pwm_samsung_enable(struct pwm_chip *chip, struct pwm_device *pwm)