Skip to content

Commit dc7c31b

Browse files
committed
drivers/base: Remove CONFIG_SRCU
Now that the SRCU Kconfig option is unconditionally selected, there is no longer any point in conditional compilation based on CONFIG_SRCU. Therefore, remove the #ifdef and throw away the #else clause. Signed-off-by: Paul E. McKenney <[email protected]> Cc: Greg Kroah-Hartman <[email protected]> Cc: "Rafael J. Wysocki" <[email protected]> Acked-by: Greg Kroah-Hartman <[email protected]> Acked-by: Rafael J. Wysocki <[email protected]> Reviewed-by: John Ogness <[email protected]>
1 parent 1b929c0 commit dc7c31b

File tree

1 file changed

+0
-42
lines changed

1 file changed

+0
-42
lines changed

drivers/base/core.c

Lines changed: 0 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,6 @@ void fw_devlink_purge_absent_suppliers(struct fwnode_handle *fwnode)
181181
}
182182
EXPORT_SYMBOL_GPL(fw_devlink_purge_absent_suppliers);
183183

184-
#ifdef CONFIG_SRCU
185184
static DEFINE_MUTEX(device_links_lock);
186185
DEFINE_STATIC_SRCU(device_links_srcu);
187186

@@ -220,47 +219,6 @@ static void device_link_remove_from_lists(struct device_link *link)
220219
list_del_rcu(&link->s_node);
221220
list_del_rcu(&link->c_node);
222221
}
223-
#else /* !CONFIG_SRCU */
224-
static DECLARE_RWSEM(device_links_lock);
225-
226-
static inline void device_links_write_lock(void)
227-
{
228-
down_write(&device_links_lock);
229-
}
230-
231-
static inline void device_links_write_unlock(void)
232-
{
233-
up_write(&device_links_lock);
234-
}
235-
236-
int device_links_read_lock(void)
237-
{
238-
down_read(&device_links_lock);
239-
return 0;
240-
}
241-
242-
void device_links_read_unlock(int not_used)
243-
{
244-
up_read(&device_links_lock);
245-
}
246-
247-
#ifdef CONFIG_DEBUG_LOCK_ALLOC
248-
int device_links_read_lock_held(void)
249-
{
250-
return lockdep_is_held(&device_links_lock);
251-
}
252-
#endif
253-
254-
static inline void device_link_synchronize_removal(void)
255-
{
256-
}
257-
258-
static void device_link_remove_from_lists(struct device_link *link)
259-
{
260-
list_del(&link->s_node);
261-
list_del(&link->c_node);
262-
}
263-
#endif /* !CONFIG_SRCU */
264222

265223
static bool device_is_ancestor(struct device *dev, struct device *target)
266224
{

0 commit comments

Comments
 (0)