diff options
author | Oleksandr Suvorov <oleksandr.suvorov@toradex.com> | 2020-03-26 12:44:27 +0200 |
---|---|---|
committer | Oleksandr Suvorov <oleksandr.suvorov@toradex.com> | 2020-03-26 12:46:50 +0200 |
commit | 87d308708712ff6075c4dd54b0519b47fdad8816 (patch) | |
tree | 2fb6458b1db7dd21be2648f42412dd2485846c76 /backport-include/pcmcia |
Backports v5.4.27
Backports generated by toradex backports f6e8852f1ef28e6d3c9bae8400eb6a87a6b0c3e7
against mainline kernel tag v5.4.27
Signed-off-by: Oleksandr Suvorov <oleksandr.suvorov@toradex.com>
Diffstat (limited to 'backport-include/pcmcia')
-rw-r--r-- | backport-include/pcmcia/device_id.h | 23 | ||||
-rw-r--r-- | backport-include/pcmcia/ds.h | 29 |
2 files changed, 52 insertions, 0 deletions
diff --git a/backport-include/pcmcia/device_id.h b/backport-include/pcmcia/device_id.h new file mode 100644 index 0000000..908af50 --- /dev/null +++ b/backport-include/pcmcia/device_id.h @@ -0,0 +1,23 @@ +#ifndef __BACKPORT_PCMCIA_DEVICE_ID_H +#define __BACKPORT_PCMCIA_DEVICE_ID_H +#include_next <pcmcia/device_id.h> + +#ifndef PCMCIA_DEVICE_MANF_CARD_PROD_ID3 +#define PCMCIA_DEVICE_MANF_CARD_PROD_ID3(manf, card, v3, vh3) { \ + .match_flags = PCMCIA_DEV_ID_MATCH_MANF_ID| \ + PCMCIA_DEV_ID_MATCH_CARD_ID| \ + PCMCIA_DEV_ID_MATCH_PROD_ID3, \ + .manf_id = (manf), \ + .card_id = (card), \ + .prod_id = { NULL, NULL, (v3), NULL }, \ + .prod_id_hash = { 0, 0, (vh3), 0 }, } +#endif + +#ifndef PCMCIA_DEVICE_PROD_ID3 +#define PCMCIA_DEVICE_PROD_ID3(v3, vh3) { \ + .match_flags = PCMCIA_DEV_ID_MATCH_PROD_ID3, \ + .prod_id = { NULL, NULL, (v3), NULL }, \ + .prod_id_hash = { 0, 0, (vh3), 0 }, } +#endif + +#endif /* __BACKPORT_PCMCIA_DEVICE_ID_H */ diff --git a/backport-include/pcmcia/ds.h b/backport-include/pcmcia/ds.h new file mode 100644 index 0000000..45ab33a --- /dev/null +++ b/backport-include/pcmcia/ds.h @@ -0,0 +1,29 @@ +#ifndef __BACKPORT_PCMCIA_DS_H +#define __BACKPORT_PCMCIA_DS_H +#include_next <pcmcia/ds.h> + +#ifndef module_pcmcia_driver +/** + * backport of: + * + * commit 6ed7ffddcf61f668114edb676417e5fb33773b59 + * Author: H Hartley Sweeten <hsweeten@visionengravers.com> + * Date: Wed Mar 6 11:24:44 2013 -0700 + * + * pcmcia/ds.h: introduce helper for pcmcia_driver module boilerplate + */ + +/** + * module_pcmcia_driver() - Helper macro for registering a pcmcia driver + * @__pcmcia_driver: pcmcia_driver struct + * + * Helper macro for pcmcia drivers which do not do anything special in module + * init/exit. This eliminates a lot of boilerplate. Each module may only use + * this macro once, and calling it replaces module_init() and module_exit(). + */ +#define module_pcmcia_driver(__pcmcia_driver) \ + module_driver(__pcmcia_driver, pcmcia_register_driver, \ + pcmcia_unregister_driver) +#endif + +#endif /* __BACKPORT_PCMCIA_DS_H */ |