git://ftp.safe.ca
/
safe
/
jmp
/
linux-2.6
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'for-2.6.35' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie...
[safe/jmp/linux-2.6]
/
drivers
/
pcmcia
/
pxa2xx_base.c
diff --git
a/drivers/pcmcia/pxa2xx_base.c
b/drivers/pcmcia/pxa2xx_base.c
index
7f61b62
..
df4532e
100644
(file)
--- a/
drivers/pcmcia/pxa2xx_base.c
+++ b/
drivers/pcmcia/pxa2xx_base.c
@@
-17,6
+17,7
@@
======================================================================*/
#include <linux/module.h>
======================================================================*/
#include <linux/module.h>
+#include <linux/slab.h>
#include <linux/init.h>
#include <linux/cpufreq.h>
#include <linux/ioport.h>
#include <linux/init.h>
#include <linux/cpufreq.h>
#include <linux/ioport.h>
@@
-214,7
+215,8
@@
static void pxa2xx_configure_sockets(struct device *dev)
MECR |= MECR_CIT;
/* Set MECR:NOS (Number Of Sockets) */
MECR |= MECR_CIT;
/* Set MECR:NOS (Number Of Sockets) */
- if ((ops->first + ops->nr) > 1 || machine_is_viper())
+ if ((ops->first + ops->nr) > 1 ||
+ machine_is_viper() || machine_is_arcom_zeus())
MECR |= MECR_NOS;
else
MECR &= ~MECR_NOS;
MECR |= MECR_NOS;
else
MECR &= ~MECR_NOS;
@@
-252,6
+254,7
@@
int pxa2xx_drv_pcmcia_add_one(struct soc_pcmcia_socket *skt)
return soc_pcmcia_add_one(skt);
}
return soc_pcmcia_add_one(skt);
}
+EXPORT_SYMBOL(pxa2xx_drv_pcmcia_add_one);
void pxa2xx_drv_pcmcia_ops(struct pcmcia_low_level *ops)
{
void pxa2xx_drv_pcmcia_ops(struct pcmcia_low_level *ops)
{
@@
-261,19
+264,19
@@
void pxa2xx_drv_pcmcia_ops(struct pcmcia_low_level *ops)
ops->frequency_change = pxa2xx_pcmcia_frequency_change;
#endif
}
ops->frequency_change = pxa2xx_pcmcia_frequency_change;
#endif
}
+EXPORT_SYMBOL(pxa2xx_drv_pcmcia_ops);
-
int __pxa2xx_drv_pcmcia_probe(struct
device *dev)
+
static int pxa2xx_drv_pcmcia_probe(struct platform_
device *dev)
{
int i, ret = 0;
struct pcmcia_low_level *ops;
struct skt_dev_info *sinfo;
struct soc_pcmcia_socket *skt;
{
int i, ret = 0;
struct pcmcia_low_level *ops;
struct skt_dev_info *sinfo;
struct soc_pcmcia_socket *skt;
- if (!dev || !dev->platform_data)
+ ops = (struct pcmcia_low_level *)dev->dev.platform_data;
+ if (!ops)
return -ENODEV;
return -ENODEV;
- ops = (struct pcmcia_low_level *)dev->platform_data;
-
pxa2xx_drv_pcmcia_ops(ops);
sinfo = kzalloc(SKT_DEV_INFO_SIZE(ops->nr), GFP_KERNEL);
pxa2xx_drv_pcmcia_ops(ops);
sinfo = kzalloc(SKT_DEV_INFO_SIZE(ops->nr), GFP_KERNEL);
@@
-287,10
+290,10
@@
int __pxa2xx_drv_pcmcia_probe(struct device *dev)
skt = &sinfo->skt[i];
skt->nr = ops->first + i;
skt = &sinfo->skt[i];
skt->nr = ops->first + i;
- skt->irq = NO_IRQ;
skt->ops = ops;
skt->socket.owner = ops->owner;
skt->ops = ops;
skt->socket.owner = ops->owner;
- skt->socket.dev.parent = dev;
+ skt->socket.dev.parent = &dev->dev;
+ skt->socket.pci_irq = NO_IRQ;
ret = pxa2xx_drv_pcmcia_add_one(skt);
if (ret)
ret = pxa2xx_drv_pcmcia_add_one(skt);
if (ret)
@@
-302,19
+305,12
@@
int __pxa2xx_drv_pcmcia_probe(struct device *dev)
soc_pcmcia_remove_one(&sinfo->skt[i]);
kfree(sinfo);
} else {
soc_pcmcia_remove_one(&sinfo->skt[i]);
kfree(sinfo);
} else {
- pxa2xx_configure_sockets(dev);
- dev_set_drvdata(dev, sinfo);
+ pxa2xx_configure_sockets(
&dev->
dev);
+ dev_set_drvdata(
&dev->
dev, sinfo);
}
return ret;
}
}
return ret;
}
-EXPORT_SYMBOL(__pxa2xx_drv_pcmcia_probe);
-
-
-static int pxa2xx_drv_pcmcia_probe(struct platform_device *dev)
-{
- return __pxa2xx_drv_pcmcia_probe(&dev->dev);
-}
static int pxa2xx_drv_pcmcia_remove(struct platform_device *dev)
{
static int pxa2xx_drv_pcmcia_remove(struct platform_device *dev)
{
@@
-330,19
+326,13
@@
static int pxa2xx_drv_pcmcia_remove(struct platform_device *dev)
return 0;
}
return 0;
}
-static int pxa2xx_drv_pcmcia_suspend(struct device *dev)
-{
- return pcmcia_socket_dev_suspend(dev);
-}
-
static int pxa2xx_drv_pcmcia_resume(struct device *dev)
{
pxa2xx_configure_sockets(dev);
static int pxa2xx_drv_pcmcia_resume(struct device *dev)
{
pxa2xx_configure_sockets(dev);
- return
pcmcia_socket_dev_resume(dev)
;
+ return
0
;
}
}
-static struct dev_pm_ops pxa2xx_drv_pcmcia_pm_ops = {
- .suspend = pxa2xx_drv_pcmcia_suspend,
+static const struct dev_pm_ops pxa2xx_drv_pcmcia_pm_ops = {
.resume = pxa2xx_drv_pcmcia_resume,
};
.resume = pxa2xx_drv_pcmcia_resume,
};