#include "pmcc4_private.h"
#include "sbeproc.h"
-/*****************************************************************************************
+/*******************************************************************************
* Error out early if we have compiler trouble.
*
* (This section is included from the kernel's init/main.c as a friendly
#warning gcc-4.1.0 is known to miscompile the kernel. A different compiler version is recommended.
#endif
-/*****************************************************************************************/
+/*******************************************************************************/
#define CHANNAME "hdlc"
static int
-chan_attach_noop(struct net_device *ndev, unsigned short foo_1, unsigned short foo_2)
+chan_attach_noop(struct net_device *ndev, unsigned short foo_1,
+ unsigned short foo_2)
{
/* our driver has nothing to do here, show's
* over, go home
priv = OS_kmalloc(sizeof(struct c4_priv));
if (!priv)
{
- pr_warning("%s: no memory for net_device !\n", ci->devname);
+ pr_warning("%s: no memory for net_device !\n",
+ ci->devname);
return NULL;
}
dev = alloc_hdlcdev(priv);
if (!dev)
{
- pr_warning("%s: no memory for hdlc_device !\n", ci->devname);
+ pr_warning("%s: no memory for hdlc_device !\n",
+ ci->devname);
OS_kfree(priv);
return NULL;
}
switch (hi->promfmt)
{
case PROM_FORMAT_TYPE1:
- memcpy(dev->dev_addr, (FLD_TYPE1 *) (hi->mfg_info.pft1.Serial), 6);
+ memcpy(dev->dev_addr,
+ (FLD_TYPE1 *) (hi->mfg_info.pft1.Serial), 6);
break;
case PROM_FORMAT_TYPE2:
- memcpy(dev->dev_addr, (FLD_TYPE2 *) (hi->mfg_info.pft2.Serial), 6);
+ memcpy(dev->dev_addr,
+ (FLD_TYPE2 *) (hi->mfg_info.pft2.Serial), 6);
break;
default:
memset(dev->dev_addr, 0, 6);
ret = mkret(c4_new_chan(ci, cp.port, cp.channum, dev));
if (ret)
{
- rtnl_unlock(); /* needed due to Ioctl calling sequence */
+ /* needed due to Ioctl calling sequence */
+ rtnl_unlock();
unregister_hdlc_device(dev);
- rtnl_lock(); /* needed due to Ioctl calling sequence */
+ /* needed due to Ioctl calling sequence */
+ rtnl_lock();
free_netdev(dev);
}
return ret;
ch->user = NULL; /* will be freed, below */
}
+ /* needed if Ioctl calling sequence */
if (lockit)
- rtnl_unlock(); /* needed if Ioctl calling sequence */
+ rtnl_unlock();
unregister_hdlc_device(ndev);
+ /* needed if Ioctl calling sequence */
if (lockit)
- rtnl_lock(); /* needed if Ioctl calling sequence */
+ rtnl_lock();
free_netdev(ndev);
return 0;
}
ret = do_pld_rw(ndev, data);
break;
case SBE_IOC_IID_GET:
- ret = (iolen == sizeof(struct sbe_iid_info)) ? c4_get_iidinfo(ci, &arg.u.iip) : -EFAULT;
+ ret = (iolen == sizeof(struct sbe_iid_info)) ?
+ c4_get_iidinfo(ci, &arg.u.iip) : -EFAULT;
if (ret == 0) /* no error, copy data */
if (copy_to_user(data, &arg, iolen))
return -EFAULT;
ndev = alloc_netdev(sizeof(ci_t), SBE_IFACETMPL, c4_setup);
if (!ndev)
{
- pr_warning("%s: no memory for struct net_device !\n", hi->devname);
+ pr_warning("%s: no memory for struct net_device !\n",
+ hi->devname);
error_flag = ENOMEM;
return NULL;
}
IRQF_SHARED,
ndev->name, ndev))
{
- pr_warning("%s: MUSYCC could not get irq: %d\n", ndev->name, irq0);
+ pr_warning("%s: MUSYCC could not get irq: %d\n",
+ ndev->name, irq0);
unregister_netdev(ndev);
OS_kfree(netdev_priv(ndev));
OS_kfree(ndev);
switch (hi->promfmt)
{
case PROM_FORMAT_TYPE1:
- memcpy(ndev->dev_addr, (FLD_TYPE1 *) (hi->mfg_info.pft1.Serial), 6);
+ memcpy(ndev->dev_addr,
+ (FLD_TYPE1 *) (hi->mfg_info.pft1.Serial), 6);
/* unaligned data acquisition */
memcpy(&tmp, (FLD_TYPE1 *) (hi->mfg_info.pft1.Id), 4);
ci->brd_id = cpu_to_be32(tmp);
break;
case PROM_FORMAT_TYPE2:
- memcpy(ndev->dev_addr, (FLD_TYPE2 *) (hi->mfg_info.pft2.Serial), 6);
+ memcpy(ndev->dev_addr,
+ (FLD_TYPE2 *) (hi->mfg_info.pft2.Serial), 6);
/* unaligned data acquisition */
memcpy(&tmp, (FLD_TYPE2 *) (hi->mfg_info.pft2.Id), 4);
ci->brd_id = cpu_to_be32(tmp);
pr_warning("%s\n", pmcc4_OSSI_release);
if ((rtn = c4hw_attach_all()))
- return -rtn; /* installation failure - see system log */
+ return -rtn; /* installation failure - see system log */
/* housekeeping notifications */
if (cxt1e1_log_level != log_level_default)