diff options
Diffstat (limited to 'drivers/phy/samsung/phy-samsung-usb2.c')
-rw-r--r-- | drivers/phy/samsung/phy-samsung-usb2.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/drivers/phy/samsung/phy-samsung-usb2.c b/drivers/phy/samsung/phy-samsung-usb2.c index ea818866985a..6c82f4fbe8a2 100644 --- a/drivers/phy/samsung/phy-samsung-usb2.c +++ b/drivers/phy/samsung/phy-samsung-usb2.c @@ -1,12 +1,9 @@ +// SPDX-License-Identifier: GPL-2.0-only /* * Samsung SoC USB 1.1/2.0 PHY driver * * Copyright (C) 2013 Samsung Electronics Co., Ltd. * Author: Kamil Debski <k.debski@samsung.com> - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation. */ #include <linux/clk.h> @@ -159,9 +156,8 @@ static int samsung_usb2_phy_probe(struct platform_device *pdev) if (!cfg) return -EINVAL; - drv = devm_kzalloc(dev, sizeof(struct samsung_usb2_phy_driver) + - cfg->num_phys * sizeof(struct samsung_usb2_phy_instance), - GFP_KERNEL); + drv = devm_kzalloc(dev, struct_size(drv, instances, cfg->num_phys), + GFP_KERNEL); if (!drv) return -ENOMEM; |