sched: fix compile errors with CONFIG_NET_SCHED deactivated in the kernel config (#5553)

SVN-Revision: 16903
owl
Felix Fietkau 2009-07-18 20:31:21 +00:00
parent bab4138b4a
commit cf2c544844
2 changed files with 6 additions and 2 deletions

View File

@ -123,11 +123,12 @@
.enqueue = pfifo_fast_enqueue, .enqueue = pfifo_fast_enqueue,
.dequeue = pfifo_fast_dequeue, .dequeue = pfifo_fast_dequeue,
.requeue = pfifo_fast_requeue, .requeue = pfifo_fast_requeue,
@@ -739,3 +803,16 @@ void dev_shutdown(struct net_device *dev @@ -739,3 +803,18 @@ void dev_shutdown(struct net_device *dev
shutdown_scheduler_queue(dev, &dev->rx_queue, &noop_qdisc); shutdown_scheduler_queue(dev, &dev->rx_queue, &noop_qdisc);
WARN_ON(timer_pending(&dev->watchdog_timer)); WARN_ON(timer_pending(&dev->watchdog_timer));
} }
+ +
+#ifdef CONFIG_NET_SCHED
+static int __init sch_generic_init(void) +static int __init sch_generic_init(void)
+{ +{
+ return register_qdisc(&pfifo_fast_ops); + return register_qdisc(&pfifo_fast_ops);
@ -140,3 +141,4 @@
+ +
+module_init(sch_generic_init) +module_init(sch_generic_init)
+module_exit(sch_generic_exit) +module_exit(sch_generic_exit)
+#endif

View File

@ -123,11 +123,12 @@
.enqueue = pfifo_fast_enqueue, .enqueue = pfifo_fast_enqueue,
.dequeue = pfifo_fast_dequeue, .dequeue = pfifo_fast_dequeue,
.peek = pfifo_fast_peek, .peek = pfifo_fast_peek,
@@ -735,3 +799,16 @@ void dev_shutdown(struct net_device *dev @@ -735,3 +799,18 @@ void dev_shutdown(struct net_device *dev
shutdown_scheduler_queue(dev, &dev->rx_queue, &noop_qdisc); shutdown_scheduler_queue(dev, &dev->rx_queue, &noop_qdisc);
WARN_ON(timer_pending(&dev->watchdog_timer)); WARN_ON(timer_pending(&dev->watchdog_timer));
} }
+ +
+#ifdef CONFIG_NET_SCHED
+static int __init sch_generic_init(void) +static int __init sch_generic_init(void)
+{ +{
+ return register_qdisc(&pfifo_fast_ops); + return register_qdisc(&pfifo_fast_ops);
@ -140,3 +141,4 @@
+ +
+module_init(sch_generic_init) +module_init(sch_generic_init)
+module_exit(sch_generic_exit) +module_exit(sch_generic_exit)
+#endif