backports: add NFC patches
PATCH v3 6/8 backports: add NFC patches
These are NFC patches refreshed on next-20130404
Signed-off-by Thierry Escande <[email protected]>
--- .../nfc/01-netlink-portid/INFO | 42 +++++ .../nfc/01-netlink-portid/net_nfc_netlink.patch | 71 ++++++++ patches/collateral-evolutions/nfc/02-pr_fmt/INFO | 6 + .../nfc/02-pr_fmt/net_nfc.patch | 181 ++++++++++++++++++++ .../nfc/03-driver-core-constify-data/INFO | 7 + .../net_nfc_core.patch | 14 ++ 6 files changed, 321 insertions(+) create mode 100644 patches/collateral-evolutions/nfc/01-netlink-portid/INFO create mode 100644 patches/collateral-evolutions/nfc/01-netlink-portid/net_nfc_netlink.patch create mode 100644 patches/collateral-evolutions/nfc/02-pr_fmt/INFO create mode 100644 patches/collateral-evolutions/nfc/02-pr_fmt/net_nfc.patch create mode 100644 patches/collateral-evolutions/nfc/03-driver-core-constify-data/INFO create mode 100644 patches/collateral-evolutions/nfc/03-driver-core-constify-data/net_nfc_core.patch
patches/collateral-evolutions/nfc/01-netlink-portid/INFO new file +42 -0
@@ -0,0 +1,42 @@ +The patch: + +commit 15e473046cb6e5d18a4d0057e61d76315230382b +Author: Eric W. Biederman <[email protected]> +Date: Fri Sep 7 20:12:54 2012 +0000 + + netlink: Rename pid to portid to avoid confusion + + It is a frequent mistake to confuse the netlink port identifier with a + process identifier. Try to reduce this confusion by renaming fields + that hold port identifiers portid instead of pid. + + I have carefully avoided changing the structures exported to + userspace to avoid changing the userspace API. + + I have successfully built an allyesconfig kernel with this change. + + Signed-off-by: "Eric W. Biederman" <[email protected]> + Acked-by: Stephen Hemminger <[email protected]> + Signed-off-by: David S. Miller <[email protected]> + +Changed the struct members: + +struct netlink_notify->pid to +struct netlink_notify->portid + +struct genl_info->snd_pid to +struct genl_info->snd_portid + +To help backport this and not have to #ifdef around it against +kernel versions compat has introduced two helpers for us to +simply do the backport with two macro helpers: + +genl_info_snd_portid() +netlink_notify_portid() + +This takes care of the work for us requiring only one +single line change. If we get another patch thrown into +this file then I suspect we can extract SMPL out of it +and use it to backport further collateral evolutions like +this one should other drivers / subsystem need this change. +
patches/collateral-evolutions/nfc/01-netlink-portid/net_nfc_netlink.patch new file +71 -0
71 lines not on this page · raw message
patches/collateral-evolutions/nfc/02-pr_fmt/INFO new file +6 -0
@@ -0,0 +1,6 @@ + +Undef/define/include printk.h for fixing redefinition warnings +during build. + +Patch adapted from compat-wireless tree. +
patches/collateral-evolutions/nfc/02-pr_fmt/net_nfc.patch new file +181 -0
181 lines not on this page · raw message
patches/collateral-evolutions/nfc/03-driver-core-constify-data/INFO new file +7 -0
@@ -0,0 +1,7 @@ +This backports: + +commit 9f3b795a626ee79574595e06d1437fe0c7d51d29 +Author: Michał Mirosław <[email protected]> +Date: Fri Feb 1 20:40:17 2013 +0100 + + driver-core: constify data for class_find_device()
patches/collateral-evolutions/nfc/03-driver-core-constify-data/net_nfc_core.patch new file +14 -0
@@ -0,0 +1,14 @@ +--- a/net/nfc/core.c ++++ b/net/nfc/core.c +@@ -732,7 +732,11 @@ struct class nfc_class = { + }; + EXPORT_SYMBOL(nfc_class); + ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,9,0)) + static int match_idx(struct device *d, const void *data) ++#else ++static int match_idx(struct device *d, void *data) ++#endif + { + struct nfc_dev *dev = to_nfc_dev(d); + const unsigned int *idx = data;
Signature · 1 line
1.7.10.4
Quoted 55 lines · Thierry Escande
These are NFC patches refreshed on next-20130404
Signed-off-by Thierry Escande <[email protected]>--- .../nfc/01-netlink-portid/INFO | 42 +++++ .../nfc/01-netlink-portid/net_nfc_netlink.patch | 71 ++++++++ patches/collateral-evolutions/nfc/02-pr_fmt/INFO | 6 + .../nfc/02-pr_fmt/net_nfc.patch | 181 ++++++++++++++++++++ .../nfc/03-driver-core-constify-data/INFO | 7 + .../net_nfc_core.patch | 14 ++ 6 files changed, 321 insertions(+) create mode 100644 patches/collateral-evolutions/nfc/01-netlink-portid/INFO create mode 100644 patches/collateral-evolutions/nfc/01-netlink-portid/net_nfc_netlink.patch create mode 100644 patches/collateral-evolutions/nfc/02-pr_fmt/INFO create mode 100644 patches/collateral-evolutions/nfc/02-pr_fmt/net_nfc.patch create mode 100644 patches/collateral-evolutions/nfc/03-driver-core-constify-data/INFO create mode 100644 patches/collateral-evolutions/nfc/03-driver-core-constify-data/net_nfc_core.patchpatches/collateral-evolutions/nfc/01-netlink-portid/INFO new file +31
-0@@ -0,0 +1,42 @@ +The patch: + +commit 15e473046cb6e5d18a4d0057e61d76315230382b +Author: Eric W. Biederman <[email protected]> +Date: Fri Sep 7 20:12:54 2012 +0000 + + netlink: Rename pid to portid to avoid confusion + + It is a frequent mistake to confuse the netlink port identifier with a + process identifier. Try to reduce this confusion by renaming fields + that hold port identifiers portid instead of pid. + + I have carefully avoided changing the structures exported to + userspace to avoid changing the userspace API. + + I have successfully built an allyesconfig kernel with this change. + + Signed-off-by: "Eric W. Biederman" <[email protected]> + Acked-by: Stephen Hemminger <[email protected]> + Signed-off-by: David S. Miller <[email protected]> + +Changed the struct members: + +struct netlink_notify->pid to +struct netlink_notify->portid + +struct genl_info->snd_pid to +struct genl_info->snd_portid + +To help backport this and not have to #ifdef around it against +kernel versions compat has introduced two helpers for us to
patches/collateral-evolutions/nfc/01-netlink-portid/INFO line 41
Quoted 10 lines
patches/collateral-evolutions/nfc/01-netlink-portid/INFO new file +10
-0+simply do the backport with two macro helpers: + +genl_info_snd_portid() +netlink_notify_portid() + +This takes care of the work for us requiring only one +single line change. If we get another patch thrown into +this file then I suspect we can extract SMPL out of it +and use it to backport further collateral evolutions like +this one should other drivers / subsystem need this change.
Here's one example where using SmPL would make sense given we now have two subsystems using these changes. I'm fine with this going in as-is though.
Luis