/*
- * $Id: pmc551.c,v 1.28 2004/08/09 13:19:44 dwmw2 Exp $
+ * $Id: pmc551.c,v 1.30 2005/01/05 18:05:13 dwmw2 Exp $
*
* PMC551 PCI Mezzanine Ram Device
*
static int pmc551_erase (struct mtd_info *mtd, struct erase_info *instr)
{
- struct mypriv *priv = (struct mypriv *)mtd->priv;
+ struct mypriv *priv = mtd->priv;
u32 soff_hi, soff_lo; /* start address offset hi/lo */
u32 eoff_hi, eoff_lo; /* end address offset hi/lo */
unsigned long end;
static int pmc551_point (struct mtd_info *mtd, loff_t from, size_t len, size_t *retlen, u_char **mtdbuf)
{
- struct mypriv *priv = (struct mypriv *)mtd->priv;
+ struct mypriv *priv = mtd->priv;
u32 soff_hi;
u32 soff_lo;
static int pmc551_read (struct mtd_info *mtd, loff_t from, size_t len, size_t *retlen, u_char *buf)
{
- struct mypriv *priv = (struct mypriv *)mtd->priv;
+ struct mypriv *priv = mtd->priv;
u32 soff_hi, soff_lo; /* start address offset hi/lo */
u32 eoff_hi, eoff_lo; /* end address offset hi/lo */
unsigned long end;
static int pmc551_write (struct mtd_info *mtd, loff_t to, size_t len, size_t *retlen, const u_char *buf)
{
- struct mypriv *priv = (struct mypriv *)mtd->priv;
+ struct mypriv *priv = mtd->priv;
u32 soff_hi, soff_lo; /* start address offset hi/lo */
u32 eoff_hi, eoff_lo; /* end address offset hi/lo */
unsigned long end;
MODULE_LICENSE("GPL");
MODULE_AUTHOR("Mark Ferrell <mferrell@mvista.com>");
MODULE_DESCRIPTION(PMC551_VERSION);
-MODULE_PARM(msize, "i");
-MODULE_PARM_DESC(msize, "memory size in Megabytes [1 - 1024]");
-MODULE_PARM(asize, "i");
-MODULE_PARM_DESC(asize, "aperture size, must be <= memsize [1-1024]");
/*
* Stuff these outside the ifdef so as to not bust compiled in driver support
static int asize=0;
#endif
+module_param(msize, int, 0);
+MODULE_PARM_DESC(msize, "memory size in Megabytes [1 - 1024]");
+module_param(asize, int, 0);
+MODULE_PARM_DESC(asize, "aperture size, must be <= memsize [1-1024]");
+
/*
* PMC551 Card Initialization
*/
-int __init init_pmc551(void)
+static int __init init_pmc551(void)
{
struct pci_dev *PCI_Device = NULL;
struct mypriv *priv;
struct mypriv *priv;
while((mtd=pmc551list)) {
- priv = (struct mypriv *)mtd->priv;
+ priv = mtd->priv;
pmc551list = priv->nextpmc551;
if(priv->start) {