Linux Audio

Check our new training course

Loading...
v3.1
 
 1/*
 2 * linux/drivers/pcmcia/pxa/pxa_cm_x2xx.c
 3 *
 4 * This program is free software; you can redistribute it and/or modify
 5 * it under the terms of the GNU General Public License version 2 as
 6 * published by the Free Software Foundation.
 7 *
 8 * Compulab Ltd., 2003, 2007, 2008
 9 * Mike Rapoport <mike@compulab.co.il>
10 *
11 */
12
13#include <linux/module.h>
14
15#include <asm/system.h>
16#include <asm/mach-types.h>
17#include <mach/system.h>
18
19int cmx255_pcmcia_init(void);
20int cmx270_pcmcia_init(void);
21void cmx255_pcmcia_exit(void);
22void cmx270_pcmcia_exit(void);
23
24static int __init cmx2xx_pcmcia_init(void)
25{
26	int ret = -ENODEV;
27
28	if (machine_is_armcore() && cpu_is_pxa25x())
29		ret = cmx255_pcmcia_init();
30	else if (machine_is_armcore() && cpu_is_pxa27x())
31		ret = cmx270_pcmcia_init();
32
33	return ret;
34}
35
36static void __exit cmx2xx_pcmcia_exit(void)
37{
38	if (machine_is_armcore() && cpu_is_pxa25x())
39		cmx255_pcmcia_exit();
40	else if (machine_is_armcore() && cpu_is_pxa27x())
41		cmx270_pcmcia_exit();
42}
43
44module_init(cmx2xx_pcmcia_init);
45module_exit(cmx2xx_pcmcia_exit);
46
47MODULE_LICENSE("GPL");
48MODULE_AUTHOR("Mike Rapoport <mike@compulab.co.il>");
49MODULE_DESCRIPTION("CM-x2xx PCMCIA driver");
v5.14.15
 1// SPDX-License-Identifier: GPL-2.0-only
 2/*
 3 * linux/drivers/pcmcia/pxa/pxa_cm_x2xx.c
 4 *
 
 
 
 
 5 * Compulab Ltd., 2003, 2007, 2008
 6 * Mike Rapoport <mike@compulab.co.il>
 
 7 */
 8
 9#include <linux/module.h>
10
 
11#include <asm/mach-types.h>
12#include <mach/hardware.h>
13
14int cmx255_pcmcia_init(void);
15int cmx270_pcmcia_init(void);
16void cmx255_pcmcia_exit(void);
17void cmx270_pcmcia_exit(void);
18
19static int __init cmx2xx_pcmcia_init(void)
20{
21	int ret = -ENODEV;
22
23	if (machine_is_armcore() && cpu_is_pxa25x())
24		ret = cmx255_pcmcia_init();
25	else if (machine_is_armcore() && cpu_is_pxa27x())
26		ret = cmx270_pcmcia_init();
27
28	return ret;
29}
30
31static void __exit cmx2xx_pcmcia_exit(void)
32{
33	if (machine_is_armcore() && cpu_is_pxa25x())
34		cmx255_pcmcia_exit();
35	else if (machine_is_armcore() && cpu_is_pxa27x())
36		cmx270_pcmcia_exit();
37}
38
39module_init(cmx2xx_pcmcia_init);
40module_exit(cmx2xx_pcmcia_exit);
41
42MODULE_LICENSE("GPL");
43MODULE_AUTHOR("Mike Rapoport <mike@compulab.co.il>");
44MODULE_DESCRIPTION("CM-x2xx PCMCIA driver");