Skip to content

Commit 9c9c64a

Browse files
committed
Remove dead sysfs bits.
1 parent 4202ec9 commit 9c9c64a

File tree

3 files changed

+4
-20
lines changed

3 files changed

+4
-20
lines changed

drivers/gpu/drm/drm_sysfs.c

+2
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,9 @@ static struct bin_attribute *connector_bin_attrs[] = {
242242

243243
static const struct attribute_group connector_dev_group = {
244244
.attrs = connector_dev_attrs,
245+
#ifndef __FreeBSD__
245246
.bin_attrs = connector_bin_attrs,
247+
#endif
246248
};
247249

248250
static const struct attribute_group *connector_dev_groups[] = {

sys/compat/linuxkpi/common/include/linux/device.h

-12
Original file line numberDiff line numberDiff line change
@@ -586,25 +586,13 @@ device_create_bin_file(struct device *dev, const struct bin_attribute *attr)
586586
return -EINVAL;
587587
}
588588

589-
590589
static inline void
591590
device_remove_bin_file(struct device *dev, const struct bin_attribute *attr)
592591
{
593592
if (dev)
594593
sysfs_remove_file(&dev->kobj, &attr->attr);
595594
}
596595

597-
static inline bool
598-
device_remove_file_self(struct device *dev, const struct device_attribute *attr)
599-
{
600-
601-
if (dev) {
602-
sysfs_remove_file(&dev->kobj, &attr->attr);
603-
return (true);
604-
}
605-
return (false);
606-
}
607-
608596
static inline int
609597
class_create_file(struct class *class, const struct class_attribute *attr)
610598
{

sys/compat/linuxkpi/common/include/linux/sysfs.h

+2-8
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,6 @@ struct attribute {
5252
mode_t mode;
5353
};
5454

55-
#define sysfs_attr_init(attr) do {} while(0)
56-
5755

5856
struct sysfs_ops {
5957
ssize_t (*show)(struct kobject *, struct attribute *, char *);
@@ -65,10 +63,7 @@ struct attribute_group {
6563
const char *name;
6664
umode_t (*is_visible)(struct kobject *,
6765
struct attribute *, int);
68-
umode_t (*is_bin_visible)(struct kobject *,
69-
struct bin_attribute *, int);
7066
struct attribute **attrs;
71-
struct bin_attribute **bin_attrs;
7267
};
7368

7469

@@ -138,9 +133,6 @@ extern void sysfs_remove_link(struct kobject *kobj, const char *name);
138133
void sysfs_notify(struct kobject *kobj, const char *dir, const char *attr);
139134

140135

141-
struct pci_bus;
142-
struct pci_dev;
143-
144136
extern int lkpi_sysfs_create_file(struct kobject *kobj, const struct attribute *attr);
145137
extern void lkpi_sysfs_remove_file(struct kobject *kobj, const struct attribute *attr);
146138

@@ -180,4 +172,6 @@ sysfs_streq(const char *s1, const char *s2)
180172
return false;
181173
}
182174

175+
#define sysfs_attr_init(attr) do {} while(0)
176+
183177
#endif /* _LINUX_SYSFS_H_ */

0 commit comments

Comments
 (0)