aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/generic
diff options
context:
space:
mode:
authorAleksander Jan Bajkowski <olek2@wp.pl>2023-05-14 11:43:57 +0200
committerChristian Lamparter <chunkeey@gmail.com>2023-05-20 15:19:14 +0200
commit7365e6b00a7ab823467b7d92d4f3f0bdbe271f35 (patch)
treef3a7cc668c0e4b4a9c3c46a7aac21117a7ed2fc5 /target/linux/generic
parent5e91b4507c0010970482099464b44a5404835caa (diff)
downloadupstream-7365e6b00a7ab823467b7d92d4f3f0bdbe271f35.tar.gz
upstream-7365e6b00a7ab823467b7d92d4f3f0bdbe271f35.tar.bz2
upstream-7365e6b00a7ab823467b7d92d4f3f0bdbe271f35.zip
kernel: remove obsolete kernel version switches
This removes unneeded kernel version switches from the targets after kernel 5.10 has been dropped. Signed-off-by: Aleksander Jan Bajkowski <olek2@wp.pl>
Diffstat (limited to 'target/linux/generic')
-rw-r--r--target/linux/generic/files/block/partitions/fit.c4
-rw-r--r--target/linux/generic/files/drivers/net/phy/ar8216.c16
-rw-r--r--target/linux/generic/files/drivers/net/phy/b53/b53_common.c6
3 files changed, 0 insertions, 26 deletions
diff --git a/target/linux/generic/files/block/partitions/fit.c b/target/linux/generic/files/block/partitions/fit.c
index ce6a2b5411..13c03743f3 100644
--- a/target/linux/generic/files/block/partitions/fit.c
+++ b/target/linux/generic/files/block/partitions/fit.c
@@ -73,11 +73,7 @@
int parse_fit_partitions(struct parsed_partitions *state, u64 fit_start_sector, u64 sectors, int *slot, int add_remain)
{
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 11, 0)
struct block_device *bdev = state->disk->part0;
-#else
- struct block_device *bdev = state->bdev;
-#endif
struct address_space *mapping = bdev->bd_inode->i_mapping;
struct page *page;
void *fit, *init_fit;
diff --git a/target/linux/generic/files/drivers/net/phy/ar8216.c b/target/linux/generic/files/drivers/net/phy/ar8216.c
index bf98fd599e..5e248f856e 100644
--- a/target/linux/generic/files/drivers/net/phy/ar8216.c
+++ b/target/linux/generic/files/drivers/net/phy/ar8216.c
@@ -891,11 +891,7 @@ ar8216_phy_write(struct ar8xxx_priv *priv, int addr, int regnum, u16 val)
static int
ar8229_hw_init(struct ar8xxx_priv *priv)
{
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 5, 0)
phy_interface_t phy_if_mode;
-#else
- int phy_if_mode;
-#endif
if (priv->initialized)
return 0;
@@ -903,11 +899,7 @@ ar8229_hw_init(struct ar8xxx_priv *priv)
ar8xxx_write(priv, AR8216_REG_CTRL, AR8216_CTRL_RESET);
ar8xxx_reg_wait(priv, AR8216_REG_CTRL, AR8216_CTRL_RESET, 0, 1000);
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 5, 0)
of_get_phy_mode(priv->pdev->of_node, &phy_if_mode);
-#else
- phy_if_mode = of_get_phy_mode(priv->pdev->of_node);
-#endif
if (phy_if_mode == PHY_INTERFACE_MODE_GMII) {
ar8xxx_write(priv, AR8229_REG_OPER_MODE0,
@@ -2467,11 +2459,7 @@ ar8xxx_phy_config_init(struct phy_device *phydev)
/* VID fixup only needed on ar8216 */
if (chip_is_ar8216(priv)) {
dev->phy_ptr = priv;
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(5,15,0)
dev->extra_priv_flags |= IFF_NO_IP_ALIGN;
-#else
- dev->priv_flags |= IFF_NO_IP_ALIGN;
-#endif
dev->eth_mangle_rx = ar8216_mangle_rx;
dev->eth_mangle_tx = ar8216_mangle_tx;
}
@@ -2706,11 +2694,7 @@ ar8xxx_phy_detach(struct phy_device *phydev)
#ifdef CONFIG_ETHERNET_PACKET_MANGLE
dev->phy_ptr = NULL;
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(5,15,0)
dev->extra_priv_flags &= ~IFF_NO_IP_ALIGN;
-#else
- dev->priv_flags &= ~IFF_NO_IP_ALIGN;
-#endif
dev->eth_mangle_rx = NULL;
dev->eth_mangle_tx = NULL;
#endif
diff --git a/target/linux/generic/files/drivers/net/phy/b53/b53_common.c b/target/linux/generic/files/drivers/net/phy/b53/b53_common.c
index 87d731ec3e..215a369e63 100644
--- a/target/linux/generic/files/drivers/net/phy/b53/b53_common.c
+++ b/target/linux/generic/files/drivers/net/phy/b53/b53_common.c
@@ -506,15 +506,9 @@ static int b53_configure_ports_of(struct b53_device *dev)
if (fixed_link) {
u32 spd;
u8 po = GMII_PO_LINK;
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 5, 0)
phy_interface_t mode;
-#else
- int mode = of_get_phy_mode(pn);
-#endif
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 5, 0)
of_get_phy_mode(pn, &mode);
-#endif
if (!of_property_read_u32(fixed_link, "speed", &spd)) {
switch (spd) {