mdelay(1);\
}
+#ifndef MODULE
struct net_device * __init ewrk3_probe(int unit)
{
struct net_device *dev = alloc_etherdev(sizeof(struct ewrk3_private));
return ERR_PTR(err);
}
+#endif
static int __init ewrk3_probe1(struct net_device *dev, u_long iobase, int irq)
{
for (; (i < maxSlots) && (dev != NULL);
iobase += EWRK3_IOP_INC, i++)
{
- if (request_region(iobase, EWRK3_TOTAL_SIZE, dev->name)) {
+ if (request_region(iobase, EWRK3_TOTAL_SIZE, DRV_NAME)) {
if (DevicePresent(iobase) == 0) {
int irq = dev->irq;
ret = ewrk3_hw_init(dev, iobase);
for (i = 1; (i < maxSlots) && (dev != NULL); i++, iobase += EISA_SLOT_INC) {
if (EISA_signature(name, EISA_ID) == 0) {
- if (request_region(iobase, EWRK3_TOTAL_SIZE, dev->name) &&
+ if (request_region(iobase, EWRK3_TOTAL_SIZE, DRV_NAME) &&
DevicePresent(iobase) == 0) {
int irq = dev->irq;
ret = ewrk3_hw_init(dev, iobase);
return status; /* return the device name string */
}
-static int ewrk3_ethtool_ioctl(struct net_device *dev, void *useraddr)
+static int ewrk3_ethtool_ioctl(struct net_device *dev, void __user *useraddr)
{
struct ewrk3_private *lp = (struct ewrk3_private *) dev->priv;
u_long iobase = dev->base_addr;
u32 ethcmd;
- if (get_user(ethcmd, (u32 *)useraddr))
+ if (get_user(ethcmd, (u32 __user *)useraddr))
return -EFAULT;
switch (ethcmd) {
static int ewrk3_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
{
struct ewrk3_private *lp = (struct ewrk3_private *) dev->priv;
- struct ewrk3_ioctl *ioc = (struct ewrk3_ioctl *) &rq->ifr_data;
+ struct ewrk3_ioctl *ioc = (struct ewrk3_ioctl *) &rq->ifr_ifru;
u_long iobase = dev->base_addr;
int i, j, status = 0;
u_char csr;
/* ethtool IOCTLs are handled elsewhere */
if (cmd == SIOCETHTOOL)
- return ewrk3_ethtool_ioctl(dev, (void *)rq->ifr_data);
+ return ewrk3_ethtool_ioctl(dev, rq->ifr_data);
/* Other than ethtool, all we handle are private IOCTLs */
if (cmd != EWRK3IOCTL)