#19015: Build for Mikrotik RB433UAH fails after upgrade to kernel v3.18
-----------------------+------------------------
  Reporter:  duvi      |      Owner:  developers
      Type:  defect    |     Status:  new
  Priority:  normal    |  Milestone:
 Component:  packages  |    Version:  Trunk
Resolution:            |   Keywords:
-----------------------+------------------------

Comment (by alexisgreen):

 Yaffs2 patch:

 {{{
 Index: target/linux/generic/files/fs/yaffs2/yaffs_vfs.c
 ===================================================================
 --- target/linux/generic/files/fs/yaffs2/yaffs_vfs.c    (revision 44497)
 +++ target/linux/generic/files/fs/yaffs2/yaffs_vfs.c    (working copy)
 @@ -764,8 +764,22 @@
         return 0;
  }

 +#if (LINUX_VERSION_CODE > KERNEL_VERSION(3, 16, 0))
 +static const struct file_operations yaffs_file_operations = {
 +       .read = new_sync_read,
 +       .write = new_sync_write,
 +       .read_iter = generic_file_read_iter,
 +       .write_iter = generic_file_write_iter,
 +       .mmap = generic_file_mmap,
 +       .flush = yaffs_file_flush,
 +       .fsync = yaffs_sync_object,
 +       .splice_read = generic_file_splice_read,
 +       .splice_write = iter_file_splice_write,
 +       .llseek = generic_file_llseek,
 +};

 -#if (LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 22))
 +
 +#elif (LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 22))
  static const struct file_operations yaffs_file_operations = {
         .read = do_sync_read,
         .write = do_sync_write,
 @@ -1023,7 +1037,11 @@
         if (!alias)
                 return -ENOMEM;

 +#if LINUX_VERSION_CODE <= KERNEL_VERSION(3, 14, 99)
         ret = vfs_readlink(dentry, buffer, buflen, alias);
 +#else
 +       ret = readlink_copy(buffer, buflen, alias);
 +#endif
         kfree(alias);
         return ret;
  }
 }}}

 RB433U gpio-latch patch:

 {{{
 --- a/target/linux/ar71xx/files/drivers/gpio/gpio-latch.c
 +++ b/target/linux/ar71xx/files/drivers/gpio/gpio-latch.c
 @@ -8,6 +8,7 @@
   *  by the Free Software Foundation.
   */

 +#include <linux/version.h>
  #include <linux/kernel.h>
  #include <linux/init.h>
  #include <linux/module.h>
 @@ -192,8 +193,12 @@ static int gpio_latch_probe(struct platform_device
 *pdev)
  static int gpio_latch_remove(struct platform_device *pdev)
  {
         struct gpio_latch_chip *glc = platform_get_drvdata(pdev);
 -
 -       return gpiochip_remove(&glc->gc);;
 +#if (LINUX_VERSION_CODE <= KERNEL_VERSION(3, 18, 0))
 +       return gpiochip_remove(&glc->gc);
 +#else
 +       gpiochip_remove(&glc->gc);
 +       return 0;
 +#endif
  }


 }}}

--
Ticket URL: <https://dev.openwrt.org/ticket/19015#comment:2>
OpenWrt <http://openwrt.org>
Opensource Wireless Router Technology
_______________________________________________
openwrt-tickets mailing list
[email protected]
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-tickets

Reply via email to