diff --git a/package/boot/uboot-kirkwood/Makefile b/package/boot/uboot-kirkwood/Makefile index 7338e5d8681169..afeee805a0be39 100644 --- a/package/boot/uboot-kirkwood/Makefile +++ b/package/boot/uboot-kirkwood/Makefile @@ -8,7 +8,7 @@ include $(TOPDIR)/rules.mk PKG_VERSION:=2020.04 -PKG_RELEASE:=10 +PKG_RELEASE:=11 PKG_HASH:=fe732aaf037d9cc3c0909bad8362af366ae964bbdac6913a34081ff4ad565372 diff --git a/package/boot/uboot-kirkwood/patches/180-netgear-stora.patch b/package/boot/uboot-kirkwood/patches/180-netgear-stora.patch index c6aced422173b7..bdf82ebea57fb2 100644 --- a/package/boot/uboot-kirkwood/patches/180-netgear-stora.patch +++ b/package/boot/uboot-kirkwood/patches/180-netgear-stora.patch @@ -230,7 +230,7 @@ + --- /dev/null +++ b/board/Marvell/netgear_ms2110/netgear_ms2110.c -@@ -0,0 +1,151 @@ +@@ -0,0 +1,152 @@ +/* + * Copyright (C) 2014-2017 bodhi + * @@ -264,6 +264,7 @@ +#include +#include +#include "netgear_ms2110.h" ++#include +#include + +DECLARE_GLOBAL_DATA_PTR; diff --git a/package/boot/uboot-kirkwood/patches/200-openwrt-config.patch b/package/boot/uboot-kirkwood/patches/200-openwrt-config.patch index 4cf874b3687cac..00bc29f13e067d 100644 --- a/package/boot/uboot-kirkwood/patches/200-openwrt-config.patch +++ b/package/boot/uboot-kirkwood/patches/200-openwrt-config.patch @@ -1,6 +1,6 @@ --- a/arch/arm/mach-kirkwood/Kconfig +++ b/arch/arm/mach-kirkwood/Kconfig -@@ -111,4 +111,7 @@ source "board/alliedtelesis/SBx81LIFXCAT +@@ -115,4 +115,7 @@ source "board/alliedtelesis/SBx81LIFXCAT source "board/Marvell/db-88f6281-bp/Kconfig" source "board/checkpoint/l-50/Kconfig" diff --git a/package/libs/openssl/Makefile b/package/libs/openssl/Makefile index 554cde7a2de481..959424ce12c540 100644 --- a/package/libs/openssl/Makefile +++ b/package/libs/openssl/Makefile @@ -17,13 +17,9 @@ PKG_BUILD_PARALLEL:=1 PKG_BASE:=$(subst $(space),.,$(wordlist 1,2,$(subst .,$(space),$(PKG_VERSION)))) PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:= \ - http://www.openssl.org/source/ \ - http://www.openssl.org/source/old/$(PKG_BASE)/ \ - https://github.com/openssl/openssl/releases/download/$(PKG_NAME)-$(PKG_VERSION)/ \ - http://ftp.fi.muni.cz/pub/openssl/source/ \ - http://ftp.fi.muni.cz/pub/openssl/source/old/$(PKG_BASE)/ \ - ftp://ftp.pca.dfn.de/pub/tools/net/openssl/source/ \ - ftp://ftp.pca.dfn.de/pub/tools/net/openssl/source/old/$(PKG_BASE)/ + https://www.openssl.org/source/ \ + https://www.openssl.org/source/old/$(PKG_BASE)/ \ + https://github.com/openssl/openssl/releases/download/$(PKG_NAME)-$(PKG_VERSION)/ PKG_HASH:=23c666d0edf20f14249b3d8f0368acaee9ab585b09e1de82107c66e1f3ec9533 @@ -74,7 +70,7 @@ endif define Package/openssl/Default TITLE:=Open source SSL toolkit - URL:=http://www.openssl.org/ + URL:=https://www.openssl.org/ SECTION:=libs CATEGORY:=Libraries endef diff --git a/target/linux/ath79/files/drivers/gpio/gpio-latch-mikrotik.c b/target/linux/ath79/files/drivers/gpio/gpio-latch-mikrotik.c index 8f53974e46af24..70f091b79ff398 100644 --- a/target/linux/ath79/files/drivers/gpio/gpio-latch-mikrotik.c +++ b/target/linux/ath79/files/drivers/gpio/gpio-latch-mikrotik.c @@ -110,7 +110,6 @@ static int gpio_latch_probe(struct platform_device *pdev) struct gpio_latch_chip *glc; struct gpio_chip *gc; struct device *dev = &pdev->dev; - struct fwnode_handle *fwnode = dev->fwnode; int i, n; glc = devm_kzalloc(dev, sizeof(*glc), GFP_KERNEL); @@ -121,24 +120,19 @@ static int gpio_latch_probe(struct platform_device *pdev) mutex_init(&glc->latch_mutex); n = gpiod_count(dev, NULL); - if (n <= 0) { - dev_err(dev, "failed to get gpios: %d\n", n); - return n; - } else if (n != GPIO_LATCH_LINES) { - dev_err(dev, "expected %d gpios\n", GPIO_LATCH_LINES); + if (n <= 0) + return dev_err_probe(dev, n, "failed to get gpios"); + if (n != GPIO_LATCH_LINES) { + dev_err(dev, "expected %d gpios", GPIO_LATCH_LINES); return -EINVAL; } for (i = 0; i < n; i++) { glc->gpios[i] = devm_gpiod_get_index_optional(dev, NULL, i, GPIOD_OUT_LOW); - if (IS_ERR(glc->gpios[i])) { - if (PTR_ERR(glc->gpios[i]) != -EPROBE_DEFER) { - dev_err(dev, "failed to get gpio %d: %ld\n", i, - PTR_ERR(glc->gpios[i])); - } - return PTR_ERR(glc->gpios[i]); - } + if (IS_ERR(glc->gpios[i])) + return dev_err_probe(dev, PTR_ERR(glc->gpios[i]), + "failed to get gpio %d", i); } glc->le_gpio = 8; @@ -152,31 +146,15 @@ static int gpio_latch_probe(struct platform_device *pdev) gc = &glc->gc; gc->label = GPIO_LATCH_DRIVER_NAME; + gc->parent = dev; gc->can_sleep = true; gc->base = -1; gc->ngpio = GPIO_LATCH_LINES; gc->get = gpio_latch_get; gc->set = gpio_latch_set; gc->direction_output = gpio_latch_direction_output; - gc->fwnode = fwnode; - platform_set_drvdata(pdev, glc); - - i = gpiochip_add(&glc->gc); - if (i) { - dev_err(dev, "gpiochip_add() failed: %d\n", i); - return i; - } - - return 0; -} - -static int gpio_latch_remove(struct platform_device *pdev) -{ - struct gpio_latch_chip *glc = platform_get_drvdata(pdev); - - gpiochip_remove(&glc->gc); - return 0; + return devm_gpiochip_add_data(dev, gc, glc); } static const struct of_device_id gpio_latch_match[] = { @@ -188,7 +166,6 @@ MODULE_DEVICE_TABLE(of, gpio_latch_match); static struct platform_driver gpio_latch_driver = { .probe = gpio_latch_probe, - .remove = gpio_latch_remove, .driver = { .name = GPIO_LATCH_DRIVER_NAME, .owner = THIS_MODULE, diff --git a/target/linux/ramips/files/drivers/net/ethernet/ralink/mtk_eth_soc.c b/target/linux/ramips/files/drivers/net/ethernet/ralink/mtk_eth_soc.c index c7e074aaa5d9e2..893198d8261a12 100644 --- a/target/linux/ramips/files/drivers/net/ethernet/ralink/mtk_eth_soc.c +++ b/target/linux/ramips/files/drivers/net/ethernet/ralink/mtk_eth_soc.c @@ -1522,7 +1522,6 @@ static void fe_pending_work(struct work_struct *work) static int fe_probe(struct platform_device *pdev) { - struct resource *res = platform_get_resource(pdev, IORESOURCE_MEM, 0); const struct of_device_id *match; struct fe_soc_data *soc; struct net_device *netdev; @@ -1542,17 +1541,14 @@ static int fe_probe(struct platform_device *pdev) else soc->reg_table = fe_reg_table; - fe_base = devm_ioremap_resource(&pdev->dev, res); - if (IS_ERR(fe_base)) { - err = -EADDRNOTAVAIL; - goto err_out; - } + fe_base = devm_platform_ioremap_resource(pdev, 0); + if (IS_ERR(fe_base)) + return PTR_ERR(fe_base); - netdev = alloc_etherdev(sizeof(*priv)); + netdev = devm_alloc_etherdev_mqs(&pdev->dev, sizeof(*priv), 4, 4); if (!netdev) { dev_err(&pdev->dev, "alloc_etherdev failed\n"); - err = -ENOMEM; - goto err_iounmap; + return -ENOMEM; } SET_NETDEV_DEV(netdev, &pdev->dev); @@ -1562,16 +1558,15 @@ static int fe_probe(struct platform_device *pdev) netdev->irq = platform_get_irq(pdev, 0); if (netdev->irq < 0) { dev_err(&pdev->dev, "no IRQ resource found\n"); - err = -ENXIO; - goto err_free_dev; + return -ENXIO; } priv = netdev_priv(netdev); spin_lock_init(&priv->page_lock); - priv->resets = devm_reset_control_array_get_exclusive(&pdev->dev); + priv->resets = devm_reset_control_array_get_optional_exclusive(&pdev->dev); if (IS_ERR(priv->resets)) { dev_err(&pdev->dev, "Failed to get resets for FE and ESW cores: %pe\n", priv->resets); - priv->resets = NULL; + return PTR_ERR(priv->resets); } if (soc->init_data) @@ -1589,11 +1584,9 @@ static int fe_probe(struct platform_device *pdev) netdev->features |= NETIF_F_HW_VLAN_CTAG_FILTER; if (fe_reg_table[FE_REG_FE_COUNTER_BASE]) { - priv->hw_stats = kzalloc(sizeof(*priv->hw_stats), GFP_KERNEL); - if (!priv->hw_stats) { - err = -ENOMEM; - goto err_free_dev; - } + priv->hw_stats = devm_kzalloc(&pdev->dev, sizeof(*priv->hw_stats), GFP_KERNEL); + if (!priv->hw_stats) + return -ENOMEM; spin_lock_init(&priv->hw_stats->stats_lock); u64_stats_init(&priv->hw_stats->syncp); } @@ -1603,15 +1596,13 @@ static int fe_probe(struct platform_device *pdev) priv->sysclk = clk_get_rate(sysclk); } else if ((priv->flags & FE_FLAG_CALIBRATE_CLK)) { dev_err(&pdev->dev, "this soc needs a clk for calibration\n"); - err = -ENXIO; - goto err_free_dev; + return -ENXIO; } priv->switch_np = of_parse_phandle(pdev->dev.of_node, "mediatek,switch", 0); if ((priv->flags & FE_FLAG_HAS_SWITCH) && !priv->switch_np) { dev_err(&pdev->dev, "failed to read switch phandle\n"); - err = -ENODEV; - goto err_free_dev; + return -ENODEV; } priv->netdev = netdev; @@ -1633,10 +1624,10 @@ static int fe_probe(struct platform_device *pdev) netif_napi_add_weight(netdev, &priv->rx_napi, fe_poll, napi_weight); fe_set_ethtool_ops(netdev); - err = register_netdev(netdev); + err = devm_register_netdev(&pdev->dev, netdev); if (err) { dev_err(&pdev->dev, "error bringing up device\n"); - goto err_free_dev; + return err; } platform_set_drvdata(pdev, netdev); @@ -1645,13 +1636,6 @@ static int fe_probe(struct platform_device *pdev) netdev->base_addr, netdev->irq); return 0; - -err_free_dev: - free_netdev(netdev); -err_iounmap: - devm_iounmap(&pdev->dev, fe_base); -err_out: - return err; } static int fe_remove(struct platform_device *pdev) @@ -1660,12 +1644,9 @@ static int fe_remove(struct platform_device *pdev) struct fe_priv *priv = netdev_priv(dev); netif_napi_del(&priv->rx_napi); - kfree(priv->hw_stats); cancel_work_sync(&priv->pending_work); - unregister_netdev(dev); - free_netdev(dev); platform_set_drvdata(pdev, NULL); return 0; diff --git a/tools/e2fsprogs/Makefile b/tools/e2fsprogs/Makefile index 2c35adfa8f9b07..8a8a2e181f3f7b 100644 --- a/tools/e2fsprogs/Makefile +++ b/tools/e2fsprogs/Makefile @@ -30,7 +30,8 @@ HOST_CONFIGURE_ARGS += \ --disable-tls \ --disable-nls \ --enable-threads=pth \ - --disable-fuse2fs + --disable-fuse2fs \ + --with-crond-dir=no define Host/Prepare $(call Host/Prepare/Default) diff --git a/tools/e2fsprogs/patches/001-exit_0_on_corrected_errors.patch b/tools/e2fsprogs/patches/001-exit_0_on_corrected_errors.patch deleted file mode 100644 index c94c609160e0a4..00000000000000 --- a/tools/e2fsprogs/patches/001-exit_0_on_corrected_errors.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/e2fsck/e2fsck.h -+++ b/e2fsck/e2fsck.h -@@ -81,7 +81,7 @@ - * Exit codes used by fsck-type programs - */ - #define FSCK_OK 0 /* No errors */ --#define FSCK_NONDESTRUCT 1 /* File system errors corrected */ -+#define FSCK_NONDESTRUCT 0 /* File system errors corrected */ - #define FSCK_REBOOT 2 /* System should be rebooted */ - #define FSCK_UNCORRECTED 4 /* File system errors left uncorrected */ - #define FSCK_ERROR 8 /* Operational error */ diff --git a/tools/e2fsprogs/patches/002-dont-build-e4defrag.patch b/tools/e2fsprogs/patches/002-dont-build-e4defrag.patch deleted file mode 100644 index f59cd317a1d339..00000000000000 --- a/tools/e2fsprogs/patches/002-dont-build-e4defrag.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/misc/Makefile.in -+++ b/misc/Makefile.in -@@ -12,7 +12,7 @@ MKDIR_P = @MKDIR_P@ - - @MCONFIG@ - --@DEFRAG_CMT@@LINUX_CMT@E4DEFRAG_PROG= e4defrag -+@DEFRAG_CMT@@LINUX_CMT@E4DEFRAG_PROG= - @DEFRAG_CMT@@LINUX_CMT@E4DEFRAG_MAN= e4defrag.8 - - @LINUX_CMT@E4CRYPT_PROG = e4crypt diff --git a/tools/e2fsprogs/patches/003-no-crond.patch b/tools/e2fsprogs/patches/003-no-crond.patch deleted file mode 100644 index 67ddd4ab0ce90f..00000000000000 --- a/tools/e2fsprogs/patches/003-no-crond.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/configure -+++ b/configure -@@ -15259,7 +15259,7 @@ then : - - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ${crond_dir}" >&5 - printf "%s\n" "${crond_dir}" >&6; } -- have_crond="yes" -+ have_crond="no"; with_crond_dir="" - - else $as_nop -