예제 #1
0
int bcm43xx_sysfs_register(struct bcm43xx_private *bcm)
{
	struct device *dev = &bcm->pci_dev->dev;
	int err;

	assert(bcm43xx_status(bcm) == BCM43xx_STAT_INITIALIZED);

	err = device_create_file(dev, &dev_attr_sprom);
	if (err)
		goto out;
	err = device_create_file(dev, &dev_attr_interference);
	if (err)
		goto err_remove_sprom;
	err = device_create_file(dev, &dev_attr_shortpreamble);
	if (err)
		goto err_remove_interfmode;

out:
	return err;
err_remove_interfmode:
	device_remove_file(dev, &dev_attr_interference);
err_remove_sprom:
	device_remove_file(dev, &dev_attr_sprom);
	goto out;
}
예제 #2
0
int bcm43xx_sysfs_register(struct bcm43xx_wldev *wldev)
{
	struct device *dev = wldev->dev->dev;
	int err;

	assert(bcm43xx_status(wldev) == BCM43xx_STAT_INITIALIZED);

	err = device_create_file(dev, &dev_attr_interference);
	if (err)
		goto out;
	err = device_create_file(dev, &dev_attr_shortpreamble);
	if (err)
		goto err_remove_interfmode;

out:
	return err;
err_remove_interfmode:
	device_remove_file(dev, &dev_attr_interference);
	goto out;
}