forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-05-11 04dd17822334871b23ea2862f7798fb0e0007777
kernel/drivers/phy/samsung/phy-samsung-usb2.c
....@@ -1,12 +1,9 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /*
23 * Samsung SoC USB 1.1/2.0 PHY driver
34 *
45 * Copyright (C) 2013 Samsung Electronics Co., Ltd.
56 * Author: Kamil Debski <k.debski@samsung.com>
6
- *
7
- * This program is free software; you can redistribute it and/or modify
8
- * it under the terms of the GNU General Public License version 2 as
9
- * published by the Free Software Foundation.
107 */
118
129 #include <linux/clk.h>
....@@ -159,9 +156,8 @@
159156 if (!cfg)
160157 return -EINVAL;
161158
162
- drv = devm_kzalloc(dev, sizeof(struct samsung_usb2_phy_driver) +
163
- cfg->num_phys * sizeof(struct samsung_usb2_phy_instance),
164
- GFP_KERNEL);
159
+ drv = devm_kzalloc(dev, struct_size(drv, instances, cfg->num_phys),
160
+ GFP_KERNEL);
165161 if (!drv)
166162 return -ENOMEM;
167163
....@@ -254,11 +250,12 @@
254250 .driver = {
255251 .of_match_table = samsung_usb2_phy_of_match,
256252 .name = "samsung-usb2-phy",
253
+ .suppress_bind_attrs = true,
257254 }
258255 };
259256
260257 module_platform_driver(samsung_usb2_phy_driver);
261
-MODULE_DESCRIPTION("Samsung S5P/EXYNOS SoC USB PHY driver");
258
+MODULE_DESCRIPTION("Samsung S5P/Exynos SoC USB PHY driver");
262259 MODULE_AUTHOR("Kamil Debski <k.debski@samsung.com>");
263260 MODULE_LICENSE("GPL v2");
264261 MODULE_ALIAS("platform:samsung-usb2-phy");