mirror of
				https://github.com/torvalds/linux.git
				synced 2025-11-04 02:30:34 +02:00 
			
		
		
		
	drm: Rename drm_connector_unplug_all() to drm_connector_unregister_all()
Current name is a bit misleading because what that helper function really does it calls drm_connector_unregister() for all connectors. This all has nothing to do with hotplugging so let's name things properly. And while at it remove potentially dangerous locking around drm_connector_unregister() in rcar_du_remove() as mentioned in kerneldoc for drm_connector_unregister_all(). Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com> Cc: Daniel Vetter <daniel@ffwll.ch> Cc: David Airlie <airlied@linux.ie> Cc: Boris Brezillon <boris.brezillon@free-electrons.com> Cc: linux-renesas-soc@vger.kernel.org Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Acked-by: Boris Brezillon <boris.brezillon@free-electrons.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: http://patchwork.freedesktop.org/patch/msgid/1458722577-20283-2-git-send-email-abrodkin@synopsys.com
This commit is contained in:
		
							parent
							
								
									11622d4c63
								
							
						
					
					
						commit
						6c87e5c3ec
					
				
					 4 changed files with 13 additions and 16 deletions
				
			
		| 
						 | 
					@ -1078,25 +1078,25 @@ void drm_connector_unregister(struct drm_connector *connector)
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
EXPORT_SYMBOL(drm_connector_unregister);
 | 
					EXPORT_SYMBOL(drm_connector_unregister);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 | 
				
			||||||
/**
 | 
					/**
 | 
				
			||||||
 * drm_connector_unplug_all - unregister connector userspace interfaces
 | 
					 * drm_connector_unregister_all - unregister connector userspace interfaces
 | 
				
			||||||
 * @dev: drm device
 | 
					 * @dev: drm device
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
 * This function unregisters all connector userspace interfaces in sysfs. Should
 | 
					 * This functions unregisters all connectors from sysfs and other places so
 | 
				
			||||||
 * be call when the device is disconnected, e.g. from an usb driver's
 | 
					 * that userspace can no longer access them. Drivers should call this as the
 | 
				
			||||||
 * ->disconnect callback.
 | 
					 * first step tearing down the device instace, or when the underlying
 | 
				
			||||||
 | 
					 * physical device disappeared (e.g. USB unplug), right before calling
 | 
				
			||||||
 | 
					 * drm_dev_unregister().
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
void drm_connector_unplug_all(struct drm_device *dev)
 | 
					void drm_connector_unregister_all(struct drm_device *dev)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
	struct drm_connector *connector;
 | 
						struct drm_connector *connector;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	/* FIXME: taking the mode config mutex ends up in a clash with sysfs */
 | 
						/* FIXME: taking the mode config mutex ends up in a clash with sysfs */
 | 
				
			||||||
	list_for_each_entry(connector, &dev->mode_config.connector_list, head)
 | 
						drm_for_each_connector(connector, dev)
 | 
				
			||||||
		drm_connector_unregister(connector);
 | 
							drm_connector_unregister(connector);
 | 
				
			||||||
 | 
					 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
EXPORT_SYMBOL(drm_connector_unplug_all);
 | 
					EXPORT_SYMBOL(drm_connector_unregister_all);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/**
 | 
					/**
 | 
				
			||||||
 * drm_encoder_init - Init a preallocated encoder
 | 
					 * drm_encoder_init - Init a preallocated encoder
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -278,10 +278,7 @@ static int rcar_du_remove(struct platform_device *pdev)
 | 
				
			||||||
	struct rcar_du_device *rcdu = platform_get_drvdata(pdev);
 | 
						struct rcar_du_device *rcdu = platform_get_drvdata(pdev);
 | 
				
			||||||
	struct drm_device *ddev = rcdu->ddev;
 | 
						struct drm_device *ddev = rcdu->ddev;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	mutex_lock(&ddev->mode_config.mutex);
 | 
						drm_connector_unregister_all(ddev);
 | 
				
			||||||
	drm_connector_unplug_all(ddev);
 | 
					 | 
				
			||||||
	mutex_unlock(&ddev->mode_config.mutex);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	drm_dev_unregister(ddev);
 | 
						drm_dev_unregister(ddev);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if (rcdu->fbdev)
 | 
						if (rcdu->fbdev)
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -94,7 +94,7 @@ static void udl_usb_disconnect(struct usb_interface *interface)
 | 
				
			||||||
	struct drm_device *dev = usb_get_intfdata(interface);
 | 
						struct drm_device *dev = usb_get_intfdata(interface);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	drm_kms_helper_poll_disable(dev);
 | 
						drm_kms_helper_poll_disable(dev);
 | 
				
			||||||
	drm_connector_unplug_all(dev);
 | 
						drm_connector_unregister_all(dev);
 | 
				
			||||||
	udl_fbdev_unplug(dev);
 | 
						udl_fbdev_unplug(dev);
 | 
				
			||||||
	udl_drop_usb(dev);
 | 
						udl_drop_usb(dev);
 | 
				
			||||||
	drm_unplug_dev(dev);
 | 
						drm_unplug_dev(dev);
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -2253,8 +2253,8 @@ void drm_connector_unregister(struct drm_connector *connector);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
extern void drm_connector_cleanup(struct drm_connector *connector);
 | 
					extern void drm_connector_cleanup(struct drm_connector *connector);
 | 
				
			||||||
extern unsigned int drm_connector_index(struct drm_connector *connector);
 | 
					extern unsigned int drm_connector_index(struct drm_connector *connector);
 | 
				
			||||||
/* helper to unplug all connectors from sysfs for device */
 | 
					/* helper to unregister all connectors from sysfs for device */
 | 
				
			||||||
extern void drm_connector_unplug_all(struct drm_device *dev);
 | 
					extern void drm_connector_unregister_all(struct drm_device *dev);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
extern int drm_bridge_add(struct drm_bridge *bridge);
 | 
					extern int drm_bridge_add(struct drm_bridge *bridge);
 | 
				
			||||||
extern void drm_bridge_remove(struct drm_bridge *bridge);
 | 
					extern void drm_bridge_remove(struct drm_bridge *bridge);
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in a new issue