| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * Samsung SoC USB 1.1/2.0 PHY driver |
|---|
| 3 | 4 | * |
|---|
| 4 | 5 | * Copyright (C) 2013 Samsung Electronics Co., Ltd. |
|---|
| 5 | 6 | * 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. |
|---|
| 10 | 7 | */ |
|---|
| 11 | 8 | |
|---|
| 12 | 9 | #include <linux/clk.h> |
|---|
| .. | .. |
|---|
| 159 | 156 | if (!cfg) |
|---|
| 160 | 157 | return -EINVAL; |
|---|
| 161 | 158 | |
|---|
| 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); |
|---|
| 165 | 161 | if (!drv) |
|---|
| 166 | 162 | return -ENOMEM; |
|---|
| 167 | 163 | |
|---|
| .. | .. |
|---|
| 254 | 250 | .driver = { |
|---|
| 255 | 251 | .of_match_table = samsung_usb2_phy_of_match, |
|---|
| 256 | 252 | .name = "samsung-usb2-phy", |
|---|
| 253 | + .suppress_bind_attrs = true, |
|---|
| 257 | 254 | } |
|---|
| 258 | 255 | }; |
|---|
| 259 | 256 | |
|---|
| 260 | 257 | 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"); |
|---|
| 262 | 259 | MODULE_AUTHOR("Kamil Debski <k.debski@samsung.com>"); |
|---|
| 263 | 260 | MODULE_LICENSE("GPL v2"); |
|---|
| 264 | 261 | MODULE_ALIAS("platform:samsung-usb2-phy"); |
|---|