diff options
author | Daniel Vetter <daniel.vetter@ffwll.ch> | 2013-11-03 15:48:48 -0500 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2014-04-23 04:32:52 -0400 |
commit | 5829d1834e5486e83547f36576b160023c9609c2 (patch) | |
tree | 0c8adba7b179e4bd5336e434d1661a2202858624 /drivers/gpu/drm/drm_pci.c | |
parent | 53bf2a2bca9b56e23fa8862159c75868672d7f1e (diff) |
drm: rip out dev->devname
This was only ever used to pretty-print the irq driver name. And on
kms systems due to set_version bonghits we never set up the prettier
name, ever. Which make this a bit pointless.
Also, we can always dig out the driver-instance/irq relationship
through other means, so this isn't that useful. So just rip it out to
simplify the set_version/set_busid insanity a bit.
Also delete the temporary busname from drm_pci_set_busid, it's now
unused.
v2: Rebase on top of the new host1x drm_bus for tegra.
Reviewed-by: Thierry Reding <treding@nvidia.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers/gpu/drm/drm_pci.c')
-rw-r--r-- | drivers/gpu/drm/drm_pci.c | 25 |
1 files changed, 0 insertions, 25 deletions
diff --git a/drivers/gpu/drm/drm_pci.c b/drivers/gpu/drm/drm_pci.c index c550b349f202..047c51046d94 100644 --- a/drivers/gpu/drm/drm_pci.c +++ b/drivers/gpu/drm/drm_pci.c | |||
@@ -146,7 +146,6 @@ static const char *drm_pci_get_name(struct drm_device *dev) | |||
146 | static int drm_pci_set_busid(struct drm_device *dev, struct drm_master *master) | 146 | static int drm_pci_set_busid(struct drm_device *dev, struct drm_master *master) |
147 | { | 147 | { |
148 | int len, ret; | 148 | int len, ret; |
149 | struct pci_driver *pdriver = dev->driver->kdriver.pci; | ||
150 | master->unique_len = 40; | 149 | master->unique_len = 40; |
151 | master->unique_size = master->unique_len; | 150 | master->unique_size = master->unique_len; |
152 | master->unique = kmalloc(master->unique_size, GFP_KERNEL); | 151 | master->unique = kmalloc(master->unique_size, GFP_KERNEL); |
@@ -168,18 +167,6 @@ static int drm_pci_set_busid(struct drm_device *dev, struct drm_master *master) | |||
168 | } else | 167 | } else |
169 | master->unique_len = len; | 168 | master->unique_len = len; |
170 | 169 | ||
171 | dev->devname = | ||
172 | kmalloc(strlen(pdriver->name) + | ||
173 | master->unique_len + 2, GFP_KERNEL); | ||
174 | |||
175 | if (dev->devname == NULL) { | ||
176 | ret = -ENOMEM; | ||
177 | goto err; | ||
178 | } | ||
179 | |||
180 | sprintf(dev->devname, "%s@%s", pdriver->name, | ||
181 | master->unique); | ||
182 | |||
183 | return 0; | 170 | return 0; |
184 | err: | 171 | err: |
185 | return ret; | 172 | return ret; |
@@ -190,7 +177,6 @@ int drm_pci_set_unique(struct drm_device *dev, | |||
190 | struct drm_unique *u) | 177 | struct drm_unique *u) |
191 | { | 178 | { |
192 | int domain, bus, slot, func, ret; | 179 | int domain, bus, slot, func, ret; |
193 | const char *bus_name; | ||
194 | 180 | ||
195 | master->unique_len = u->unique_len; | 181 | master->unique_len = u->unique_len; |
196 | master->unique_size = u->unique_len + 1; | 182 | master->unique_size = u->unique_len + 1; |
@@ -207,17 +193,6 @@ int drm_pci_set_unique(struct drm_device *dev, | |||
207 | 193 | ||
208 | master->unique[master->unique_len] = '\0'; | 194 | master->unique[master->unique_len] = '\0'; |
209 | 195 | ||
210 | bus_name = dev->driver->bus->get_name(dev); | ||
211 | dev->devname = kmalloc(strlen(bus_name) + | ||
212 | strlen(master->unique) + 2, GFP_KERNEL); | ||
213 | if (!dev->devname) { | ||
214 | ret = -ENOMEM; | ||
215 | goto err; | ||
216 | } | ||
217 | |||
218 | sprintf(dev->devname, "%s@%s", bus_name, | ||
219 | master->unique); | ||
220 | |||
221 | /* Return error if the busid submitted doesn't match the device's actual | 196 | /* Return error if the busid submitted doesn't match the device's actual |
222 | * busid. | 197 | * busid. |
223 | */ | 198 | */ |