Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 782e70c6 authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman
Browse files

USB: mark USB drivers as being GPL only



Over two years ago, the Linux USB developers stated that they believed
there was no way to create a USB kernel driver that was not under the
GPL.  This patch moves the USB apis to enforce that decision.

There are no known closed source USB drivers in the wild, so this patch
should cause no problems.

Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 667d691e
Loading
Loading
Loading
Loading
+0 −16
Original line number Diff line number Diff line
@@ -156,22 +156,6 @@ Who: Arjan van de Ven <arjan@linux.intel.com>

---------------------------

What:	USB driver API moves to EXPORT_SYMBOL_GPL
When:	February 2008
Files:	include/linux/usb.h, drivers/usb/core/driver.c
Why:	The USB subsystem has changed a lot over time, and it has been
	possible to create userspace USB drivers using usbfs/libusb/gadgetfs
	that operate as fast as the USB bus allows.  Because of this, the USB
	subsystem will not be allowing closed source kernel drivers to
	register with it, after this grace period is over.  If anyone needs
	any help in converting their closed source drivers over to use the
	userspace filesystems, please contact the
	linux-usb-devel@lists.sourceforge.net mailing list, and the developers
	there will be glad to help you out.
Who:	Greg Kroah-Hartman <gregkh@suse.de>

---------------------------

What:	vm_ops.nopage
When:	Soon, provided in-kernel callers have been converted
Why:	This interface is replaced by vm_ops.fault, but it has been around
+5 −5
Original line number Diff line number Diff line
@@ -325,7 +325,7 @@ int usb_driver_claim_interface(struct usb_driver *driver,

	return retval;
}
EXPORT_SYMBOL(usb_driver_claim_interface);
EXPORT_SYMBOL_GPL(usb_driver_claim_interface);

/**
 * usb_driver_release_interface - unbind a driver from an interface
@@ -370,7 +370,7 @@ void usb_driver_release_interface(struct usb_driver *driver,
	iface->needs_remote_wakeup = 0;
	usb_pm_unlock(udev);
}
EXPORT_SYMBOL(usb_driver_release_interface);
EXPORT_SYMBOL_GPL(usb_driver_release_interface);

/* returns 0 if no match, 1 if match */
int usb_match_device(struct usb_device *dev, const struct usb_device_id *id)
@@ -542,7 +542,7 @@ const struct usb_device_id *usb_match_id(struct usb_interface *interface,

	return NULL;
}
EXPORT_SYMBOL_GPL_FUTURE(usb_match_id);
EXPORT_SYMBOL_GPL(usb_match_id);

static int usb_device_match(struct device *dev, struct device_driver *drv)
{
@@ -745,7 +745,7 @@ int usb_register_driver(struct usb_driver *new_driver, struct module *owner,

	return retval;
}
EXPORT_SYMBOL_GPL_FUTURE(usb_register_driver);
EXPORT_SYMBOL_GPL(usb_register_driver);

/**
 * usb_deregister - unregister a USB interface driver
@@ -769,7 +769,7 @@ void usb_deregister(struct usb_driver *driver)

	usbfs_update_special();
}
EXPORT_SYMBOL_GPL_FUTURE(usb_deregister);
EXPORT_SYMBOL_GPL(usb_deregister);

#ifdef CONFIG_PM

+2 −2
Original line number Diff line number Diff line
@@ -204,7 +204,7 @@ int usb_register_dev(struct usb_interface *intf,
exit:
	return retval;
}
EXPORT_SYMBOL(usb_register_dev);
EXPORT_SYMBOL_GPL(usb_register_dev);

/**
 * usb_deregister_dev - deregister a USB device's dynamic minor.
@@ -245,4 +245,4 @@ void usb_deregister_dev(struct usb_interface *intf,
	intf->minor = -1;
	destroy_usb_class();
}
EXPORT_SYMBOL(usb_deregister_dev);
EXPORT_SYMBOL_GPL(usb_deregister_dev);
+5 −5
Original line number Diff line number Diff line
@@ -144,7 +144,7 @@ int usb_hcd_pci_probe (struct pci_dev *dev, const struct pci_device_id *id)
	dev_err (&dev->dev, "init %s fail, %d\n", pci_name(dev), retval);
	return retval;
} 
EXPORT_SYMBOL (usb_hcd_pci_probe);
EXPORT_SYMBOL_GPL(usb_hcd_pci_probe);


/* may be called without controller electrically present */
@@ -179,7 +179,7 @@ void usb_hcd_pci_remove (struct pci_dev *dev)
	usb_put_hcd (hcd);
	pci_disable_device(dev);
}
EXPORT_SYMBOL (usb_hcd_pci_remove);
EXPORT_SYMBOL_GPL(usb_hcd_pci_remove);


#ifdef	CONFIG_PM
@@ -314,7 +314,7 @@ done:

	return retval;
}
EXPORT_SYMBOL (usb_hcd_pci_suspend);
EXPORT_SYMBOL_GPL(usb_hcd_pci_suspend);

/**
 * usb_hcd_pci_resume - power management resume of a PCI-based HCD
@@ -416,7 +416,7 @@ int usb_hcd_pci_resume (struct pci_dev *dev)

	return retval;
}
EXPORT_SYMBOL (usb_hcd_pci_resume);
EXPORT_SYMBOL_GPL(usb_hcd_pci_resume);

#endif	/* CONFIG_PM */

@@ -435,5 +435,5 @@ void usb_hcd_pci_shutdown (struct pci_dev *dev)
	if (hcd->driver->shutdown)
		hcd->driver->shutdown(hcd);
}
EXPORT_SYMBOL (usb_hcd_pci_shutdown);
EXPORT_SYMBOL_GPL(usb_hcd_pci_shutdown);
+9 −9
Original line number Diff line number Diff line
@@ -971,7 +971,7 @@ long usb_calc_bus_time (int speed, int is_input, int isoc, int bytecount)
		return -1;
	}
}
EXPORT_SYMBOL (usb_calc_bus_time);
EXPORT_SYMBOL_GPL(usb_calc_bus_time);


/*-------------------------------------------------------------------------*/
@@ -1427,7 +1427,7 @@ void usb_hcd_giveback_urb(struct usb_hcd *hcd, struct urb *urb, int status)
		wake_up (&usb_kill_urb_queue);
	usb_put_urb (urb);
}
EXPORT_SYMBOL (usb_hcd_giveback_urb);
EXPORT_SYMBOL_GPL(usb_hcd_giveback_urb);

/*-------------------------------------------------------------------------*/

@@ -1667,7 +1667,7 @@ int usb_bus_start_enum(struct usb_bus *bus, unsigned port_num)
		mod_timer(&hcd->rh_timer, jiffies + msecs_to_jiffies(10));
	return status;
}
EXPORT_SYMBOL (usb_bus_start_enum);
EXPORT_SYMBOL_GPL(usb_bus_start_enum);

#endif

@@ -1774,7 +1774,7 @@ struct usb_hcd *usb_create_hcd (const struct hc_driver *driver,
			"USB Host Controller";
	return hcd;
}
EXPORT_SYMBOL (usb_create_hcd);
EXPORT_SYMBOL_GPL(usb_create_hcd);

static void hcd_release (struct kref *kref)
{
@@ -1789,14 +1789,14 @@ struct usb_hcd *usb_get_hcd (struct usb_hcd *hcd)
		kref_get (&hcd->kref);
	return hcd;
}
EXPORT_SYMBOL (usb_get_hcd);
EXPORT_SYMBOL_GPL(usb_get_hcd);

void usb_put_hcd (struct usb_hcd *hcd)
{
	if (hcd)
		kref_put (&hcd->kref, hcd_release);
}
EXPORT_SYMBOL (usb_put_hcd);
EXPORT_SYMBOL_GPL(usb_put_hcd);

/**
 * usb_add_hcd - finish generic HCD structure initialization and register
@@ -1922,7 +1922,7 @@ err_register_bus:
	hcd_buffer_destroy(hcd);
	return retval;
} 
EXPORT_SYMBOL (usb_add_hcd);
EXPORT_SYMBOL_GPL(usb_add_hcd);

/**
 * usb_remove_hcd - shutdown processing for generic HCDs
@@ -1964,7 +1964,7 @@ void usb_remove_hcd(struct usb_hcd *hcd)
	usb_deregister_bus(&hcd->self);
	hcd_buffer_destroy(hcd);
}
EXPORT_SYMBOL (usb_remove_hcd);
EXPORT_SYMBOL_GPL(usb_remove_hcd);

void
usb_hcd_platform_shutdown(struct platform_device* dev)
@@ -1974,7 +1974,7 @@ usb_hcd_platform_shutdown(struct platform_device* dev)
	if (hcd->driver->shutdown)
		hcd->driver->shutdown(hcd);
}
EXPORT_SYMBOL (usb_hcd_platform_shutdown);
EXPORT_SYMBOL_GPL(usb_hcd_platform_shutdown);

/*-------------------------------------------------------------------------*/

Loading