Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 36 additions & 0 deletions drivers/gpio/gpiolib.c
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,42 @@

#define dont_test_bit(b,d) (0)

#define REJECT_HOTPLUG_TAX 1

#if REJECT_HOTPLUG_TAX

#undef srcu_dereference
#define srcu_dereference(obj, srcu) obj

#undef srcu_dereference_check
#define srcu_dereference_check(obj, srcu, held) obj

#undef guard
#define guard(srcu) (void)

#undef scoped_guard
#define scoped_guard(x, y)
#undef list_for_each_entry_srcu
#define list_for_each_entry_srcu(pos, head, member, srcu) \
list_for_each_entry(pos, head, member)

#undef CLASS
#define CLASS(gcg, gd) \
struct gcg gd = gcg ## _init

static struct gpio_chip_guard gpio_chip_guard_init(struct gpio_desc *desc)
{
struct gpio_chip_guard _guard;

_guard.gdev = desc->gdev;
_guard.idx = 0;
_guard.gc = _guard.gdev->chip;

return _guard;
}

#endif

/* Device and char device-related information */
static DEFINE_IDA(gpio_ida);
static dev_t gpio_devt;
Expand Down