KERNEL_PATCHVER:=$(KERNEL_TESTING_PATCHVER)
endif
-LINUX_VERSION-4.14 = .180
+LINUX_VERSION-4.14 = .187
LINUX_VERSION-4.19 = .123
LINUX_VERSION-5.4 = .48
-LINUX_KERNEL_HASH-4.14.180 = 444ef973d9b6a6ea174e4a9086f0aea980d8575d13302e431ad688f22e27ed0e
+LINUX_KERNEL_HASH-4.14.187 = 5b223475eaeea196aa7e127d3f253bca5c35d8afdc72ca75230ce1ecdd1454bd
LINUX_KERNEL_HASH-4.19.123 = a79914d31a8d8c6b0e2bb0f2b143d615fe8a6c4dd2e0f36e97aa20efd69a993f
LINUX_KERNEL_HASH-5.4.48 = bf20ddafcd04c114d34654bb10d1eb74f1864f3d14b676c6f0d42d60bbcf1d53
nfc = platform_get_drvdata(pdev);
if (nfc) {
mtd = ar934x_nfc_to_mtd(nfc);
- nand_release(mtd);
+ nand_release(&nfc->nand_chip);
ar934x_nfc_free_buf(nfc);
free_irq(nfc->irq, nfc);
}
return 0;
err_release_nand:
- nand_release(mtd);
+ nand_release(&info->chip);
err_set_drvdata:
platform_set_drvdata(pdev, NULL);
err_free_info:
{
struct rb4xx_nand_info *info = platform_get_drvdata(pdev);
- nand_release(rbinfo_to_mtd(info));
+ nand_release(&info->chip));
platform_set_drvdata(pdev, NULL);
kfree(info);
gpio_free(RB4XX_NAND_GPIO_NCE);
return 0;
err_release_nand:
- nand_release(mtd);
+ nand_release(&info->chip);
err_set_drvdata:
platform_set_drvdata(pdev, NULL);
err_free_info:
{
struct rb750_nand_info *info = platform_get_drvdata(pdev);
- nand_release(rbinfo_to_mtd(info));
+ nand_release(&info->chip);
platform_set_drvdata(pdev, NULL);
kfree(info);
return 0;
err_release_nand:
- nand_release(mtd);
+ nand_release(&rbni->chip);
return ret;
}
{
struct rb91x_nand_info *info = platform_get_drvdata(pdev);
- nand_release(rbinfo_to_mtd(info));
+ nand_release(&rbni->chip);
return 0;
}
case IPV6_2292HOPOPTS:
--- a/net/ipv6/ip6_gre.c
+++ b/net/ipv6/ip6_gre.c
-@@ -397,7 +397,7 @@ static void ip6gre_err(struct sk_buff *s
+@@ -400,7 +400,7 @@ static void ip6gre_err(struct sk_buff *s
return;
ipv6h = (const struct ipv6hdr *)skb->data;
greh = (const struct gre_base_hdr *)(skb->data + offset);
*sum = csum_fold(csum_partial(diff, sizeof(diff),
--- a/drivers/net/vxlan.c
+++ b/drivers/net/vxlan.c
-@@ -1868,15 +1868,15 @@ static int vxlan_build_skb(struct sk_buf
+@@ -1872,15 +1872,15 @@ static int vxlan_build_skb(struct sk_buf
return err;
vxh = __skb_push(skb, sizeof(*vxh));
rwlock_t sk_callback_lock;
--- a/net/core/sock.c
+++ b/net/core/sock.c
-@@ -2748,6 +2748,7 @@ void sock_init_data(struct socket *sock,
+@@ -2750,6 +2750,7 @@ void sock_init_data(struct socket *sock,
sk->sk_max_pacing_rate = ~0U;
sk->sk_pacing_rate = ~0U;
--- a/drivers/usb/serial/option.c
+++ b/drivers/usb/serial/option.c
-@@ -1983,7 +1983,8 @@ static const struct usb_device_id option
+@@ -1987,7 +1987,8 @@ static const struct usb_device_id option
{ USB_DEVICE_INTERFACE_CLASS(0x2001, 0x7d01, 0xff) }, /* D-Link DWM-156 (variant) */
{ USB_DEVICE_INTERFACE_CLASS(0x2001, 0x7d02, 0xff) },
{ USB_DEVICE_INTERFACE_CLASS(0x2001, 0x7d03, 0xff) },
#define INADDR_ANY ((unsigned long int) 0x00000000)
--- a/net/ipv4/devinet.c
+++ b/net/ipv4/devinet.c
-@@ -934,7 +934,7 @@ static int inet_abc_len(__be32 addr)
+@@ -935,7 +935,7 @@ static int inet_abc_len(__be32 addr)
{
int rc = -1; /* Something else, probably a multicast. */
rc = 0;
else {
__u32 haddr = ntohl(addr);
-@@ -945,6 +945,8 @@ static int inet_abc_len(__be32 addr)
+@@ -946,6 +946,8 @@ static int inet_abc_len(__be32 addr)
rc = 16;
else if (IN_CLASSC(haddr))
rc = 24;
+
int ip6_dst_lookup(struct net *net, struct sock *sk, struct dst_entry **dst,
struct flowi6 *fl6);
- struct dst_entry *ip6_dst_lookup_flow(const struct sock *sk, struct flowi6 *fl6,
+ struct dst_entry *ip6_dst_lookup_flow(struct net *net, const struct sock *sk, struct flowi6 *fl6,
--- a/net/ipv6/ip6_output.c
+++ b/net/ipv6/ip6_output.c
@@ -381,7 +381,7 @@ static inline int ip6_forward_finish(str
-
int ip6_dst_lookup(struct net *net, struct sock *sk, struct dst_entry **dst,
struct flowi6 *fl6);
- struct dst_entry *ip6_dst_lookup_flow(const struct sock *sk, struct flowi6 *fl6,
+ struct dst_entry *ip6_dst_lookup_flow(struct net *net, const struct sock *sk, struct flowi6 *fl6,
--- a/net/ipv6/ip6_output.c
+++ b/net/ipv6/ip6_output.c
@@ -381,28 +381,6 @@ static inline int ip6_forward_finish(str
--- a/Makefile
+++ b/Makefile
-@@ -1252,7 +1252,6 @@ all: modules
+@@ -1260,7 +1260,6 @@ endif
PHONY += modules
modules: $(vmlinux-dirs) $(if $(KBUILD_BUILTIN),vmlinux) modules.builtin
@$(kecho) ' Building modules, stage 2.';
$(Q)$(MAKE) -f $(srctree)/scripts/Makefile.modpost
-@@ -1281,7 +1280,6 @@ _modinst_:
+@@ -1289,7 +1288,6 @@ _modinst_:
rm -f $(MODLIB)/build ; \
ln -s $(CURDIR) $(MODLIB)/build ; \
fi
# Read KERNELRELEASE from include/config/kernel.release (if it exists)
KERNELRELEASE = $(shell cat include/config/kernel.release 2> /dev/null)
KERNELVERSION = $(VERSION)$(if $(PATCHLEVEL),.$(PATCHLEVEL)$(if $(SUBLEVEL),.$(SUBLEVEL)))$(EXTRAVERSION)
-@@ -789,11 +794,6 @@ ifdef CONFIG_DEBUG_SECTION_MISMATCH
+@@ -779,11 +784,6 @@ ifdef CONFIG_DEBUG_SECTION_MISMATCH
KBUILD_CFLAGS += $(call cc-option, -fno-inline-functions-called-once)
endif
algorithm registration.
--- a/crypto/algboss.c
+++ b/crypto/algboss.c
-@@ -248,8 +248,12 @@ static int cryptomgr_schedule_test(struc
+@@ -246,8 +246,12 @@ static int cryptomgr_schedule_test(struc
type = alg->cra_flags;
/* Do not test internal algorithms. */
EXPORT_SYMBOL(default_qdisc_ops);
/* Main transmission queue. */
-@@ -764,7 +764,7 @@ static void attach_one_default_qdisc(str
+@@ -765,7 +765,7 @@ static void attach_one_default_qdisc(str
void *_unused)
{
struct Qdisc *qdisc;
--- a/net/sched/sch_generic.c
+++ b/net/sched/sch_generic.c
-@@ -453,146 +453,6 @@ struct Qdisc_ops noqueue_qdisc_ops __rea
+@@ -454,146 +454,6 @@ struct Qdisc_ops noqueue_qdisc_ops __rea
.owner = THIS_MODULE,
};
help
--- a/net/core/dev.c
+++ b/net/core/dev.c
-@@ -3004,10 +3004,20 @@ static int xmit_one(struct sk_buff *skb,
+@@ -3000,10 +3000,20 @@ static int xmit_one(struct sk_buff *skb,
if (!list_empty(&ptype_all) || !list_empty(&dev->ptype_all))
dev_queue_xmit_nit(skb, dev);
struct dst_entry *__sk_dst_check(struct sock *sk, u32 cookie)
{
struct dst_entry *dst = __sk_dst_get(sk);
-@@ -1598,9 +1610,11 @@ void sk_destruct(struct sock *sk)
+@@ -1599,9 +1611,11 @@ void sk_destruct(struct sock *sk)
static void __sk_free(struct sock *sk)
{
--- a/net/core/sock.c
+++ b/net/core/sock.c
-@@ -3387,6 +3387,8 @@ static __net_initdata struct pernet_oper
+@@ -3389,6 +3389,8 @@ static __net_initdata struct pernet_oper
static int __init proto_init(void)
{
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
-@@ -6145,7 +6145,7 @@ static void __ref alloc_node_mem_map(str
+@@ -6146,7 +6146,7 @@ static void __ref alloc_node_mem_map(str
mem_map = NODE_DATA(0)->node_mem_map;
#if defined(CONFIG_HAVE_MEMBLOCK_NODE_MAP) || defined(CONFIG_FLATMEM)
if (page_to_pfn(mem_map) != pgdat->node_start_pfn)
--- a/drivers/net/ethernet/intel/e1000e/netdev.c
+++ b/drivers/net/ethernet/intel/e1000e/netdev.c
-@@ -5082,7 +5082,7 @@ static bool e1000e_has_link(struct e1000
+@@ -5080,7 +5080,7 @@ static bool e1000e_has_link(struct e1000
/* get_link_status is set on LSC (link status) interrupt or
* Rx sequence error interrupt. get_link_status will stay
* for copper adapters ONLY
*/
switch (hw->phy.media_type) {
-@@ -5100,7 +5100,7 @@ static bool e1000e_has_link(struct e1000
+@@ -5098,7 +5098,7 @@ static bool e1000e_has_link(struct e1000
break;
case e1000_media_type_internal_serdes:
ret_val = hw->mac.ops.check_for_link(hw);
--- a/Makefile
+++ b/Makefile
-@@ -656,12 +656,12 @@ KBUILD_CFLAGS += $(call cc-disable-warni
+@@ -652,9 +652,9 @@ KBUILD_CFLAGS += $(call cc-disable-warni
KBUILD_CFLAGS += $(call cc-disable-warning, attribute-alias)
ifdef CONFIG_CC_OPTIMIZE_FOR_SIZE
--KBUILD_CFLAGS += -Os $(call cc-disable-warning,maybe-uninitialized,)
-+KBUILD_CFLAGS += -Os $(call cc-disable-warning,maybe-uninitialized,) $(EXTRA_OPTIMIZATION)
- else
- ifdef CONFIG_PROFILE_ALL_BRANCHES
--KBUILD_CFLAGS += -O2 $(call cc-disable-warning,maybe-uninitialized,)
-+KBUILD_CFLAGS += -O2 $(call cc-disable-warning,maybe-uninitialized,) $(EXTRA_OPTIMIZATION)
+-KBUILD_CFLAGS += -Os
++KBUILD_CFLAGS += -Os $(EXTRA_OPTIMIZATION)
else
-KBUILD_CFLAGS += -O2
+KBUILD_CFLAGS += -O2 -fno-reorder-blocks -fno-tree-ch $(EXTRA_OPTIMIZATION)
endif
- endif
+ # Tell gcc to never replace conditional load with a non-conditional one
select OF
--- a/arch/mips/Makefile
+++ b/arch/mips/Makefile
-@@ -315,7 +315,7 @@ OBJCOPYFLAGS += --remove-section=.regin
+@@ -326,7 +326,7 @@ OBJCOPYFLAGS += --remove-section=.regin
head-y := arch/mips/kernel/head.o
libs-y += arch/mips/lib/
;----------------------------------------------------------------
--- a/arch/arc/kernel/setup.c
+++ b/arch/arc/kernel/setup.c
-@@ -437,6 +437,8 @@ static inline bool uboot_arg_invalid(uns
+@@ -438,6 +438,8 @@ static inline bool uboot_arg_invalid(uns
/* We always pass 0 as magic from U-boot */
#define UBOOT_MAGIC_VALUE 0
void __init handle_uboot_args(void)
{
bool use_embedded_dtb = true;
-@@ -477,7 +479,7 @@ ignore_uboot_args:
+@@ -478,7 +480,7 @@ ignore_uboot_args:
#endif
if (use_embedded_dtb) {
#include <linux/nsproxy.h>
#include <net/net_namespace.h>
#include <net/netns/generic.h>
-@@ -978,8 +983,36 @@ static int pppoe_xmit(struct ppp_channel
+@@ -981,8 +986,36 @@ static int pppoe_xmit(struct ppp_channel
return __pppoe_xmit(sk, skb);
}
static const struct rt6_info ip6_blk_hole_entry_template = {
.dst = {
.__refcnt = ATOMIC_INIT(1),
-@@ -2054,6 +2071,11 @@ static struct rt6_info *ip6_route_info_c
+@@ -2056,6 +2073,11 @@ static struct rt6_info *ip6_route_info_c
rt->dst.output = ip6_pkt_prohibit_out;
rt->dst.input = ip6_pkt_prohibit;
break;
case RTN_THROW:
case RTN_UNREACHABLE:
default:
-@@ -2779,6 +2801,17 @@ static int ip6_pkt_prohibit_out(struct n
+@@ -2781,6 +2803,17 @@ static int ip6_pkt_prohibit_out(struct n
return ip6_pkt_drop(skb, ICMPV6_ADM_PROHIBITED, IPSTATS_MIB_OUTNOROUTES);
}
/*
* Allocate a dst for local (unicast / anycast) address.
*/
-@@ -3015,7 +3048,8 @@ static int rtm_to_fib6_config(struct sk_
+@@ -3017,7 +3050,8 @@ static int rtm_to_fib6_config(struct sk_
if (rtm->rtm_type == RTN_UNREACHABLE ||
rtm->rtm_type == RTN_BLACKHOLE ||
rtm->rtm_type == RTN_PROHIBIT ||
cfg->fc_flags |= RTF_REJECT;
if (rtm->rtm_type == RTN_LOCAL)
-@@ -3515,6 +3549,9 @@ static int rt6_fill_node(struct net *net
+@@ -3517,6 +3551,9 @@ static int rt6_fill_node(struct net *net
case -EACCES:
rtm->rtm_type = RTN_PROHIBIT;
break;
case -EAGAIN:
rtm->rtm_type = RTN_THROW;
break;
-@@ -3833,6 +3870,8 @@ static int ip6_route_dev_notify(struct n
+@@ -3835,6 +3872,8 @@ static int ip6_route_dev_notify(struct n
#ifdef CONFIG_IPV6_MULTIPLE_TABLES
net->ipv6.ip6_prohibit_entry->dst.dev = dev;
net->ipv6.ip6_prohibit_entry->rt6i_idev = in6_dev_get(dev);
net->ipv6.ip6_blk_hole_entry->dst.dev = dev;
net->ipv6.ip6_blk_hole_entry->rt6i_idev = in6_dev_get(dev);
#endif
-@@ -3844,6 +3883,7 @@ static int ip6_route_dev_notify(struct n
+@@ -3846,6 +3885,7 @@ static int ip6_route_dev_notify(struct n
in6_dev_put_clear(&net->ipv6.ip6_null_entry->rt6i_idev);
#ifdef CONFIG_IPV6_MULTIPLE_TABLES
in6_dev_put_clear(&net->ipv6.ip6_prohibit_entry->rt6i_idev);
in6_dev_put_clear(&net->ipv6.ip6_blk_hole_entry->rt6i_idev);
#endif
}
-@@ -4060,6 +4100,17 @@ static int __net_init ip6_route_net_init
+@@ -4062,6 +4102,17 @@ static int __net_init ip6_route_net_init
net->ipv6.ip6_blk_hole_entry->dst.ops = &net->ipv6.ip6_dst_ops;
dst_init_metrics(&net->ipv6.ip6_blk_hole_entry->dst,
ip6_template_metrics, true);
#endif
net->ipv6.sysctl.flush_delay = 0;
-@@ -4078,6 +4129,8 @@ out:
+@@ -4080,6 +4131,8 @@ out:
return ret;
#ifdef CONFIG_IPV6_MULTIPLE_TABLES
out_ip6_prohibit_entry:
kfree(net->ipv6.ip6_prohibit_entry);
out_ip6_null_entry:
-@@ -4095,6 +4148,7 @@ static void __net_exit ip6_route_net_exi
+@@ -4097,6 +4150,7 @@ static void __net_exit ip6_route_net_exi
#ifdef CONFIG_IPV6_MULTIPLE_TABLES
kfree(net->ipv6.ip6_prohibit_entry);
kfree(net->ipv6.ip6_blk_hole_entry);
#endif
dst_entries_destroy(&net->ipv6.ip6_dst_ops);
}
-@@ -4168,6 +4222,9 @@ void __init ip6_route_init_special_entri
+@@ -4170,6 +4224,9 @@ void __init ip6_route_init_special_entri
init_net.ipv6.ip6_prohibit_entry->rt6i_idev = in6_dev_get(init_net.loopback_dev);
init_net.ipv6.ip6_blk_hole_entry->dst.dev = init_net.loopback_dev;
init_net.ipv6.ip6_blk_hole_entry->rt6i_idev = in6_dev_get(init_net.loopback_dev);
__u16 tc_index; /* traffic control index */
--- a/net/core/dev.c
+++ b/net/core/dev.c
-@@ -4806,6 +4806,9 @@ static enum gro_result dev_gro_receive(s
+@@ -4802,6 +4802,9 @@ static enum gro_result dev_gro_receive(s
enum gro_result ret;
int grow;
if (netif_elide_gro(skb->dev))
goto normal;
-@@ -6283,6 +6286,48 @@ static void __netdev_adjacent_dev_unlink
+@@ -6279,6 +6282,48 @@ static void __netdev_adjacent_dev_unlink
&upper_dev->adj_list.lower);
}
static int __netdev_upper_dev_link(struct net_device *dev,
struct net_device *upper_dev, bool master,
void *upper_priv, void *upper_info)
-@@ -6321,6 +6366,7 @@ static int __netdev_upper_dev_link(struc
+@@ -6317,6 +6362,7 @@ static int __netdev_upper_dev_link(struc
if (ret)
return ret;
ret = call_netdevice_notifiers_info(NETDEV_CHANGEUPPER, dev,
&changeupper_info.info);
ret = notifier_to_errno(ret);
-@@ -6398,6 +6444,7 @@ void netdev_upper_dev_unlink(struct net_
+@@ -6394,6 +6440,7 @@ void netdev_upper_dev_unlink(struct net_
__netdev_adjacent_dev_unlink_neighbour(dev, upper_dev);
call_netdevice_notifiers_info(NETDEV_CHANGEUPPER, dev,
&changeupper_info.info);
}
-@@ -6962,6 +7009,7 @@ int dev_set_mac_address(struct net_devic
+@@ -6958,6 +7005,7 @@ int dev_set_mac_address(struct net_devic
if (err)
return err;
dev->addr_assign_type = NET_ADDR_SET;
default y
--- a/drivers/pci/quirks.c
+++ b/drivers/pci/quirks.c
-@@ -43,6 +43,7 @@ static void quirk_mmio_always_on(struct
+@@ -44,6 +44,7 @@ static void quirk_mmio_always_on(struct
DECLARE_PCI_FIXUP_CLASS_EARLY(PCI_ANY_ID, PCI_ANY_ID,
PCI_CLASS_BRIDGE_HOST, 8, quirk_mmio_always_on);
/* The Mellanox Tavor device gives false positive parity errors
* Mark this device with a broken_parity_status, to allow
* PCI scanning code to "skip" this now blacklisted device.
-@@ -3094,6 +3095,7 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_I
+@@ -3095,6 +3096,7 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_I
DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x65f9, quirk_intel_mc_errata);
DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x65fa, quirk_intel_mc_errata);
/*
* Ivytown NTB BAR sizes are misreported by the hardware due to an erratum. To
-@@ -3150,6 +3152,8 @@ static void fixup_debug_report(struct pc
+@@ -3151,6 +3153,8 @@ static void fixup_debug_report(struct pc
}
}
/*
* Some BIOS implementations leave the Intel GPU interrupts enabled,
* even though no one is handling them (f.e. i915 driver is never loaded).
-@@ -3188,6 +3192,8 @@ DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_IN
+@@ -3189,6 +3193,8 @@ DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_IN
DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, 0x010a, disable_igfx_irq);
DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, 0x0152, disable_igfx_irq);
depends on ACPI
--- a/drivers/ata/libata-core.c
+++ b/drivers/ata/libata-core.c
-@@ -731,6 +731,19 @@ u64 ata_tf_read_block(const struct ata_t
+@@ -730,6 +730,19 @@ u64 ata_tf_read_block(const struct ata_t
return block;
}
/**
* ata_build_rw_tf - Build ATA taskfile for given read/write request
* @tf: Target ATA taskfile
-@@ -5124,6 +5137,9 @@ struct ata_queued_cmd *ata_qc_new_init(s
+@@ -5123,6 +5136,9 @@ struct ata_queued_cmd *ata_qc_new_init(s
if (tag < 0)
return NULL;
}
qc = __ata_qc_from_tag(ap, tag);
qc->tag = tag;
-@@ -6025,6 +6041,9 @@ struct ata_port *ata_port_alloc(struct a
+@@ -6024,6 +6040,9 @@ struct ata_port *ata_port_alloc(struct a
ap->stats.unhandled_irq = 1;
ap->stats.idle_irq = 1;
#endif
ata_sff_port_init(ap);
return ap;
-@@ -6046,6 +6065,12 @@ static void ata_host_release(struct devi
+@@ -6045,6 +6064,12 @@ static void ata_host_release(struct devi
kfree(ap->pmp_link);
kfree(ap->slave_link);
kfree(ap);
host->ports[i] = NULL;
}
-@@ -6492,7 +6517,23 @@ int ata_host_register(struct ata_host *h
+@@ -6491,7 +6516,23 @@ int ata_host_register(struct ata_host *h
host->ports[i]->print_id = atomic_inc_return(&ata_print_id);
host->ports[i]->local_port_no = i + 1;
}
rc = ata_tport_add(host->dev,host->ports[i]);
--- a/include/linux/libata.h
+++ b/include/linux/libata.h
-@@ -38,6 +38,9 @@
- #include <linux/acpi.h>
+@@ -39,6 +39,9 @@
#include <linux/cdrom.h>
#include <linux/sched.h>
+ #include <linux/async.h>
+#ifdef CONFIG_ATA_LEDS
+#include <linux/leds.h>
+#endif
/*
* Define if arch has non-standard setup. This is a _PCI_ standard
-@@ -890,6 +893,12 @@ struct ata_port {
+@@ -893,6 +896,12 @@ struct ata_port {
#ifdef CONFIG_ATA_ACPI
struct ata_acpi_gtm __acpi_init_gtm; /* use ata_acpi_init_gtm() */
#endif
--- a/include/linux/mtd/rawnand.h
+++ b/include/linux/mtd/rawnand.h
-@@ -1016,6 +1016,7 @@ static inline void *nand_get_manufacture
+@@ -1014,6 +1014,7 @@ static inline void *nand_get_manufacture
#define NAND_MFR_SANDISK 0x45
#define NAND_MFR_INTEL 0x89
#define NAND_MFR_ATO 0x9b
BOOTMEM_DEFAULT);
#endif
- device_tree_init();
- sparse_init();
- plat_swiotlb_setup();
-@@ -1026,6 +1025,7 @@ void __init setup_arch(char **cmdline_p)
+ /*
+ * In order to reduce the possibility of kernel panic when failed to
+@@ -1036,6 +1035,7 @@ void __init setup_arch(char **cmdline_p)
cpu_cache_init();
paging_init();
* selected and we have 256 byte pagesize fallback to software ECC
--- a/include/linux/mtd/rawnand.h
+++ b/include/linux/mtd/rawnand.h
-@@ -862,6 +862,7 @@ struct nand_manufacturer_ops {
+@@ -860,6 +860,7 @@ struct nand_manufacturer_ops {
* structure which is shared among multiple independent
* devices.
* @priv: [OPTIONAL] pointer to private chip data
* @manufacturer: [INTERN] Contains manufacturer information
*/
-@@ -885,6 +886,9 @@ struct nand_chip {
+@@ -883,6 +884,9 @@ struct nand_chip {
int(*waitfunc)(struct mtd_info *mtd, struct nand_chip *this);
int (*erase)(struct mtd_info *mtd, int page);
int (*scan_bbt)(struct mtd_info *mtd);
+
+out:
+ MSG(INIT, "[NFI] mtk_nand_probe fail, err = %d!\n", err);
-+ nand_release(mtd);
++ nand_release(nand_chip);
+ platform_set_drvdata(pdev, NULL);
+ kfree(host);
+ nand_disable_clock();
+ struct mtd_info *mtd = host->mtd;
+ struct nand_chip *nand_chip = &host->nand_chip;
+
-+ nand_release(mtd);
++ nand_release(nand_chip);
+ kfree(host);
+ nand_disable_clock();
+
/* Invalidate page cache */
--- a/include/linux/mtd/rawnand.h
+++ b/include/linux/mtd/rawnand.h
-@@ -897,6 +897,9 @@ struct nand_chip {
+@@ -895,6 +895,9 @@ struct nand_chip {
int (*setup_data_interface)(struct mtd_info *mtd, int chipnr,
const struct nand_data_interface *conf);
static int s5p_nand_remove(struct platform_device *pdev)
{
struct s5p_nand_host *host = platform_get_drvdata(pdev);
- struct mtd_info *mtd = nand_to_mtd(&host->nand_chip);
- nand_release(mtd);
+ nand_release(&host->nand_chip);
clk_disable_unprepare(host->clk[0]); /* nandxl */
clk_disable_unprepare(host->clk[1]); /* nand */