File drivers/gpu/alga/amd/dce6/sysfs.c changed (mode: 100644) (index 1a345da..b93ad46) |
... |
... |
static ssize_t monitor_serial_show(struct device *dev, |
153 |
153 |
return r; |
return r; |
154 |
154 |
} |
} |
155 |
155 |
|
|
156 |
|
/*----------------------------------------------------------------------------*/ |
|
|
156 |
|
static ssize_t crtc_show(struct device *dev, |
|
157 |
|
struct device_attribute *attr, char *buf) |
|
158 |
|
{ |
|
159 |
|
struct dp *dp; |
|
160 |
|
|
|
161 |
|
dp = container_of(dev, struct dp, d); |
|
162 |
|
|
|
163 |
|
return scnprintf(buf, PAGE_SIZE, "%u", dp->i); |
|
164 |
|
} |
|
165 |
|
|
|
166 |
|
/*============================================================================*/ |
157 |
167 |
static DEVICE_ATTR(manufacturer, S_IRUGO, manufacturer_show, NULL); |
static DEVICE_ATTR(manufacturer, S_IRUGO, manufacturer_show, NULL); |
158 |
168 |
static DEVICE_ATTR(product_code, S_IRUGO, product_code_show, NULL); |
static DEVICE_ATTR(product_code, S_IRUGO, product_code_show, NULL); |
159 |
169 |
static DEVICE_ATTR(monitor_name, S_IRUGO, monitor_name_show, NULL); |
static DEVICE_ATTR(monitor_name, S_IRUGO, monitor_name_show, NULL); |
|
... |
... |
static struct attribute_group edid_attr_group = { |
178 |
188 |
.attrs = &edid_attrs[0] |
.attrs = &edid_attrs[0] |
179 |
189 |
}; |
}; |
180 |
190 |
|
|
|
191 |
|
/*----------------------------------------------------------------------------*/ |
|
192 |
|
|
|
193 |
|
static DEVICE_ATTR(crtc, S_IRUGO, crtc_show, NULL); |
|
194 |
|
|
|
195 |
|
static struct attribute *crtc_attrs[] = { |
|
196 |
|
&dev_attr_crtc.attr, |
|
197 |
|
NULL |
|
198 |
|
}; |
|
199 |
|
|
|
200 |
|
static struct attribute_group crtc_attr_group = { |
|
201 |
|
.attrs = &crtc_attrs[0] |
|
202 |
|
}; |
|
203 |
|
|
|
204 |
|
/*----------------------------------------------------------------------------*/ |
|
205 |
|
|
181 |
206 |
static const struct attribute_group *edid_attr_groups[] = { |
static const struct attribute_group *edid_attr_groups[] = { |
182 |
207 |
&edid_attr_group, |
&edid_attr_group, |
|
208 |
|
&crtc_attr_group, |
183 |
209 |
NULL |
NULL |
184 |
210 |
}; |
}; |
185 |
|
/*----------------------------------------------------------------------------*/ |
|
|
211 |
|
/*============================================================================*/ |
186 |
212 |
|
|
187 |
213 |
static void dce6_display_release(struct device *dev) |
static void dce6_display_release(struct device *dev) |
188 |
214 |
{ |
{ |
File drivers/gpu/alga/amd/si/drv.c changed (mode: 100644) (index c12267e..08b5afa) |
... |
... |
err_dis_pdev: |
525 |
525 |
return r; |
return r; |
526 |
526 |
} |
} |
527 |
527 |
|
|
528 |
|
static void __exit remove(struct pci_dev *dev) |
|
|
528 |
|
static void remove(struct pci_dev *dev) |
529 |
529 |
{ |
{ |
530 |
530 |
struct dev_drv_data *dd; |
struct dev_drv_data *dd; |
531 |
531 |
|
|
|
... |
... |
static struct pci_driver pci_driver = |
636 |
636 |
.name = "AMD southern island PCI driver", |
.name = "AMD southern island PCI driver", |
637 |
637 |
.id_table = pci_tbl, |
.id_table = pci_tbl, |
638 |
638 |
.probe = probe, |
.probe = probe, |
639 |
|
.remove = __exit_p(remove), |
|
|
639 |
|
.remove = remove, |
640 |
640 |
.driver.pm = NULL |
.driver.pm = NULL |
641 |
641 |
}; |
}; |
642 |
642 |
|
|
643 |
|
static int __init init(void) |
|
|
643 |
|
static int init(void) |
644 |
644 |
{ |
{ |
645 |
645 |
int r; |
int r; |
646 |
646 |
|
|
|
... |
... |
class_destroy: |
673 |
673 |
return r; |
return r; |
674 |
674 |
} |
} |
675 |
675 |
|
|
676 |
|
static void __exit cleanup(void) |
|
|
676 |
|
static void cleanup(void) |
677 |
677 |
{ |
{ |
678 |
678 |
pci_unregister_driver(&pci_driver); |
pci_unregister_driver(&pci_driver); |
679 |
679 |
unregister_chrdev_region(devt_region, GPUS_MAX); |
unregister_chrdev_region(devt_region, GPUS_MAX); |