mirror of
https://gitlab.freedesktop.org/mesa/drm.git
synced 2026-01-03 14:00:19 +01:00
radeon: fix race in sysfs
This commit is contained in:
parent
4ef8ace9a9
commit
ce2cd141c3
1 changed files with 5 additions and 1 deletions
|
|
@ -60,8 +60,12 @@ module_param_named(agpmode, radeon_agpmode, int, 0444);
|
|||
static int dri_library_name(struct drm_device * dev, char * buf)
|
||||
{
|
||||
drm_radeon_private_t *dev_priv = dev->dev_private;
|
||||
int family = dev_priv->flags & RADEON_FAMILY_MASK;
|
||||
int family;
|
||||
|
||||
if (!dev_priv)
|
||||
return 0;
|
||||
|
||||
family = dev_priv->flags & RADEON_FAMILY_MASK;
|
||||
return snprintf(buf, PAGE_SIZE, "%s\n",
|
||||
(family < CHIP_R200) ? "radeon" :
|
||||
((family < CHIP_R300) ? "r200" :
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue