ramips: fix WSR-600DHP flash layout
[openwrt.git] / target / linux / generic / patches-3.3 / 051-rng_git_backport-remove_irqf_sample_random.patch
1 --- a/arch/arm/mach-omap1/board-palmz71.c
2 +++ b/arch/arm/mach-omap1/board-palmz71.c
3 @@ -291,8 +291,7 @@ palmz71_gpio_setup(int early)
4                 }
5                 gpio_direction_input(PALMZ71_USBDETECT_GPIO);
6                 if (request_irq(gpio_to_irq(PALMZ71_USBDETECT_GPIO),
7 -                               palmz71_powercable, IRQF_SAMPLE_RANDOM,
8 -                               "palmz71-cable", 0))
9 +                               palmz71_powercable, 0, "palmz71-cable", 0))
10                         printk(KERN_ERR
11                                         "IRQ request for power cable failed!\n");
12                 palmz71_powercable(gpio_to_irq(PALMZ71_USBDETECT_GPIO), 0);
13 --- a/arch/arm/mach-pxa/lubbock.c
14 +++ b/arch/arm/mach-pxa/lubbock.c
15 @@ -455,7 +455,7 @@ static int lubbock_mci_init(struct devic
16         init_timer(&mmc_timer);
17         mmc_timer.data = (unsigned long) data;
18         return request_irq(LUBBOCK_SD_IRQ, lubbock_detect_int,
19 -                       IRQF_SAMPLE_RANDOM, "lubbock-sd-detect", data);
20 +                          0, "lubbock-sd-detect", data);
21  }
22  
23  static int lubbock_mci_get_ro(struct device *dev)
24 --- a/arch/arm/mach-pxa/magician.c
25 +++ b/arch/arm/mach-pxa/magician.c
26 @@ -617,9 +617,8 @@ static struct platform_device bq24022 =
27  static int magician_mci_init(struct device *dev,
28                                 irq_handler_t detect_irq, void *data)
29  {
30 -       return request_irq(IRQ_MAGICIAN_SD, detect_irq,
31 -                               IRQF_DISABLED | IRQF_SAMPLE_RANDOM,
32 -                               "mmc card detect", data);
33 +       return request_irq(IRQ_MAGICIAN_SD, detect_irq, IRQF_DISABLED,
34 +                          "mmc card detect", data);
35  }
36  
37  static void magician_mci_exit(struct device *dev, void *data)
38 --- a/arch/arm/mach-pxa/trizeps4.c
39 +++ b/arch/arm/mach-pxa/trizeps4.c
40 @@ -332,8 +332,8 @@ static int trizeps4_mci_init(struct devi
41         int err;
42  
43         err = request_irq(TRIZEPS4_MMC_IRQ, mci_detect_int,
44 -               IRQF_DISABLED | IRQF_TRIGGER_RISING | IRQF_SAMPLE_RANDOM,
45 -               "MMC card detect", data);
46 +                         IRQF_DISABLED | IRQF_TRIGGER_RISING,
47 +                         "MMC card detect", data);
48         if (err) {
49                 printk(KERN_ERR "trizeps4_mci_init: MMC/SD: can't request"
50                                                 "MMC card detect IRQ\n");
51 --- a/arch/ia64/kernel/irq_ia64.c
52 +++ b/arch/ia64/kernel/irq_ia64.c
53 @@ -23,7 +23,6 @@
54  #include <linux/ioport.h>
55  #include <linux/kernel_stat.h>
56  #include <linux/ptrace.h>
57 -#include <linux/random.h>      /* for rand_initialize_irq() */
58  #include <linux/signal.h>
59  #include <linux/smp.h>
60  #include <linux/threads.h>
61 --- a/arch/sparc/kernel/ldc.c
62 +++ b/arch/sparc/kernel/ldc.c
63 @@ -1250,14 +1250,12 @@ int ldc_bind(struct ldc_channel *lp, con
64         snprintf(lp->rx_irq_name, LDC_IRQ_NAME_MAX, "%s RX", name);
65         snprintf(lp->tx_irq_name, LDC_IRQ_NAME_MAX, "%s TX", name);
66  
67 -       err = request_irq(lp->cfg.rx_irq, ldc_rx,
68 -                         IRQF_SAMPLE_RANDOM | IRQF_DISABLED,
69 +       err = request_irq(lp->cfg.rx_irq, ldc_rx, IRQF_DISABLED,
70                           lp->rx_irq_name, lp);
71         if (err)
72                 return err;
73  
74 -       err = request_irq(lp->cfg.tx_irq, ldc_tx,
75 -                         IRQF_SAMPLE_RANDOM | IRQF_DISABLED,
76 +       err = request_irq(lp->cfg.tx_irq, ldc_tx, IRQF_DISABLED,
77                           lp->tx_irq_name, lp);
78         if (err) {
79                 free_irq(lp->cfg.rx_irq, lp);
80 --- a/arch/um/drivers/line.c
81 +++ b/arch/um/drivers/line.c
82 @@ -371,7 +371,7 @@ static irqreturn_t line_write_interrupt(
83  int line_setup_irq(int fd, int input, int output, struct line *line, void *data)
84  {
85         const struct line_driver *driver = line->driver;
86 -       int err = 0, flags = IRQF_DISABLED | IRQF_SHARED | IRQF_SAMPLE_RANDOM;
87 +       int err = 0, flags = IRQF_DISABLED | IRQF_SHARED;
88  
89         if (input)
90                 err = um_request_irq(driver->read_irq, fd, IRQ_READ,
91 @@ -807,7 +807,7 @@ void register_winch_irq(int fd, int tty_
92                                    .stack       = stack });
93  
94         if (um_request_irq(WINCH_IRQ, fd, IRQ_READ, winch_interrupt,
95 -                          IRQF_DISABLED | IRQF_SHARED | IRQF_SAMPLE_RANDOM,
96 +                          IRQF_DISABLED | IRQF_SHARED,
97                            "winch", winch) < 0) {
98                 printk(KERN_ERR "register_winch_irq - failed to register "
99                        "IRQ\n");
100 --- a/arch/um/drivers/mconsole_kern.c
101 +++ b/arch/um/drivers/mconsole_kern.c
102 @@ -773,7 +773,7 @@ static int __init mconsole_init(void)
103         register_reboot_notifier(&reboot_notifier);
104  
105         err = um_request_irq(MCONSOLE_IRQ, sock, IRQ_READ, mconsole_interrupt,
106 -                            IRQF_DISABLED | IRQF_SHARED | IRQF_SAMPLE_RANDOM,
107 +                            IRQF_DISABLED | IRQF_SHARED,
108                              "mconsole", (void *)sock);
109         if (err) {
110                 printk(KERN_ERR "Failed to get IRQ for management console\n");
111 --- a/arch/um/drivers/port_kern.c
112 +++ b/arch/um/drivers/port_kern.c
113 @@ -100,7 +100,7 @@ static int port_accept(struct port_list
114                   .port         = port });
115  
116         if (um_request_irq(TELNETD_IRQ, socket[0], IRQ_READ, pipe_interrupt,
117 -                         IRQF_DISABLED | IRQF_SHARED | IRQF_SAMPLE_RANDOM,
118 +                         IRQF_DISABLED | IRQF_SHARED,
119                           "telnetd", conn)) {
120                 printk(KERN_ERR "port_accept : failed to get IRQ for "
121                        "telnetd\n");
122 @@ -184,7 +184,7 @@ void *port_data(int port_num)
123         }
124  
125         if (um_request_irq(ACCEPT_IRQ, fd, IRQ_READ, port_interrupt,
126 -                         IRQF_DISABLED | IRQF_SHARED | IRQF_SAMPLE_RANDOM,
127 +                         IRQF_DISABLED | IRQF_SHARED,
128                           "port", port)) {
129                 printk(KERN_ERR "Failed to get IRQ for port %d\n", port_num);
130                 goto out_close;
131 --- a/arch/um/drivers/random.c
132 +++ b/arch/um/drivers/random.c
133 @@ -131,8 +131,7 @@ static int __init rng_init (void)
134         random_fd = err;
135  
136         err = um_request_irq(RANDOM_IRQ, random_fd, IRQ_READ, random_interrupt,
137 -                            IRQF_DISABLED | IRQF_SAMPLE_RANDOM, "random",
138 -                            NULL);
139 +                            IRQF_DISABLED, "random", NULL);
140         if (err)
141                 goto err_out_cleanup_hw;
142  
143 --- a/arch/um/drivers/xterm_kern.c
144 +++ b/arch/um/drivers/xterm_kern.c
145 @@ -50,8 +50,7 @@ int xterm_fd(int socket, int *pid_out)
146         init_completion(&data->ready);
147  
148         err = um_request_irq(XTERM_IRQ, socket, IRQ_READ, xterm_interrupt,
149 -                            IRQF_DISABLED | IRQF_SHARED | IRQF_SAMPLE_RANDOM,
150 -                            "xterm", data);
151 +                            IRQF_DISABLED | IRQF_SHARED, "xterm", data);
152         if (err) {
153                 printk(KERN_ERR "xterm_fd : failed to get IRQ for xterm, "
154                        "err = %d\n",  err);
155 --- a/arch/um/kernel/sigio.c
156 +++ b/arch/um/kernel/sigio.c
157 @@ -25,8 +25,7 @@ int write_sigio_irq(int fd)
158         int err;
159  
160         err = um_request_irq(SIGIO_WRITE_IRQ, fd, IRQ_READ, sigio_interrupt,
161 -                            IRQF_DISABLED|IRQF_SAMPLE_RANDOM, "write sigio",
162 -                            NULL);
163 +                            IRQF_DISABLED, "write sigio", NULL);
164         if (err) {
165                 printk(KERN_ERR "write_sigio_irq : um_request_irq failed, "
166                        "err = %d\n", err);
167 --- a/Documentation/feature-removal-schedule.txt
168 +++ b/Documentation/feature-removal-schedule.txt
169 @@ -71,20 +71,6 @@ Who: Luis R. Rodriguez <lrodriguez@ather
170  
171  ---------------------------
172  
173 -What:  IRQF_SAMPLE_RANDOM
174 -Check: IRQF_SAMPLE_RANDOM
175 -When:  July 2009
176 -
177 -Why:   Many of IRQF_SAMPLE_RANDOM users are technically bogus as entropy
178 -       sources in the kernel's current entropy model. To resolve this, every
179 -       input point to the kernel's entropy pool needs to better document the
180 -       type of entropy source it actually is. This will be replaced with
181 -       additional add_*_randomness functions in drivers/char/random.c
182 -
183 -Who:   Robin Getz <rgetz@blackfin.uclinux.org> & Matt Mackall <mpm@selenic.com>
184 -
185 ----------------------------
186 -
187  What:  The ieee80211_regdom module parameter
188  When:  March 2010 / desktop catchup
189  
190 --- a/drivers/block/xen-blkfront.c
191 +++ b/drivers/block/xen-blkfront.c
192 @@ -852,9 +852,8 @@ static int setup_blkring(struct xenbus_d
193         if (err)
194                 goto fail;
195  
196 -       err = bind_evtchn_to_irqhandler(info->evtchn,
197 -                                       blkif_interrupt,
198 -                                       IRQF_SAMPLE_RANDOM, "blkif", info);
199 +       err = bind_evtchn_to_irqhandler(info->evtchn, blkif_interrupt, 0,
200 +                                       "blkif", info);
201         if (err <= 0) {
202                 xenbus_dev_fatal(dev, err,
203                                  "bind_evtchn_to_irqhandler failed");
204 --- a/drivers/char/random.c
205 +++ b/drivers/char/random.c
206 @@ -633,43 +633,6 @@ struct timer_rand_state {
207         unsigned dont_count_entropy:1;
208  };
209  
210 -#ifndef CONFIG_GENERIC_HARDIRQS
211 -
212 -static struct timer_rand_state *irq_timer_state[NR_IRQS];
213 -
214 -static struct timer_rand_state *get_timer_rand_state(unsigned int irq)
215 -{
216 -       return irq_timer_state[irq];
217 -}
218 -
219 -static void set_timer_rand_state(unsigned int irq,
220 -                                struct timer_rand_state *state)
221 -{
222 -       irq_timer_state[irq] = state;
223 -}
224 -
225 -#else
226 -
227 -static struct timer_rand_state *get_timer_rand_state(unsigned int irq)
228 -{
229 -       struct irq_desc *desc;
230 -
231 -       desc = irq_to_desc(irq);
232 -
233 -       return desc->timer_rand_state;
234 -}
235 -
236 -static void set_timer_rand_state(unsigned int irq,
237 -                                struct timer_rand_state *state)
238 -{
239 -       struct irq_desc *desc;
240 -
241 -       desc = irq_to_desc(irq);
242 -
243 -       desc->timer_rand_state = state;
244 -}
245 -#endif
246 -
247  /*
248   * Add device- or boot-specific data to the input and nonblocking
249   * pools to help initialize them to unique values.
250 @@ -1131,24 +1094,6 @@ static int rand_initialize(void)
251  }
252  module_init(rand_initialize);
253  
254 -void rand_initialize_irq(int irq)
255 -{
256 -       struct timer_rand_state *state;
257 -
258 -       state = get_timer_rand_state(irq);
259 -
260 -       if (state)
261 -               return;
262 -
263 -       /*
264 -        * If kzalloc returns null, we just won't use that entropy
265 -        * source.
266 -        */
267 -       state = kzalloc(sizeof(struct timer_rand_state), GFP_KERNEL);
268 -       if (state)
269 -               set_timer_rand_state(irq, state);
270 -}
271 -
272  #ifdef CONFIG_BLOCK
273  void rand_initialize_disk(struct gendisk *disk)
274  {
275 --- a/drivers/crypto/n2_core.c
276 +++ b/drivers/crypto/n2_core.c
277 @@ -1607,8 +1607,7 @@ static int spu_map_ino(struct platform_d
278  
279         sprintf(p->irq_name, "%s-%d", irq_name, index);
280  
281 -       return request_irq(p->irq, handler, IRQF_SAMPLE_RANDOM,
282 -                          p->irq_name, p);
283 +       return request_irq(p->irq, handler, 0, p->irq_name, p);
284  }
285  
286  static struct kmem_cache *queue_cache[2];
287 --- a/drivers/hv/vmbus_drv.c
288 +++ b/drivers/hv/vmbus_drv.c
289 @@ -545,8 +545,7 @@ static int vmbus_bus_init(int irq)
290         if (ret)
291                 goto err_cleanup;
292  
293 -       ret = request_irq(irq, vmbus_isr, IRQF_SAMPLE_RANDOM,
294 -                       driver_name, hv_acpi_dev);
295 +       ret = request_irq(irq, vmbus_isr, 0, driver_name, hv_acpi_dev);
296  
297         if (ret != 0) {
298                 pr_err("Unable to request IRQ %d\n",
299 --- a/drivers/i2c/busses/i2c-pmcmsp.c
300 +++ b/drivers/i2c/busses/i2c-pmcmsp.c
301 @@ -306,8 +306,7 @@ static int __devinit pmcmsptwi_probe(str
302         pmcmsptwi_data.irq = platform_get_irq(pldev, 0);
303         if (pmcmsptwi_data.irq) {
304                 rc = request_irq(pmcmsptwi_data.irq, &pmcmsptwi_interrupt,
305 -                       IRQF_SHARED | IRQF_SAMPLE_RANDOM,
306 -                       pldev->name, &pmcmsptwi_data);
307 +                                IRQF_SHARED, pldev->name, &pmcmsptwi_data);
308                 if (rc == 0) {
309                         /*
310                          * Enable 'DONE' interrupt only.
311 --- a/drivers/input/serio/hp_sdc.c
312 +++ b/drivers/input/serio/hp_sdc.c
313 @@ -879,7 +879,7 @@ static int __init hp_sdc_init(void)
314  #endif
315  
316         errstr = "IRQ not available for";
317 -       if (request_irq(hp_sdc.irq, &hp_sdc_isr, IRQF_SHARED|IRQF_SAMPLE_RANDOM,
318 +       if (request_irq(hp_sdc.irq, &hp_sdc_isr, IRQF_SHARED,
319                         "HP SDC", &hp_sdc))
320                 goto err1;
321  
322 --- a/drivers/mfd/ab3100-core.c
323 +++ b/drivers/mfd/ab3100-core.c
324 @@ -937,9 +937,6 @@ static int __devinit ab3100_probe(struct
325  
326         err = request_threaded_irq(client->irq, NULL, ab3100_irq_handler,
327                                 IRQF_ONESHOT, "ab3100-core", ab3100);
328 -       /* This real unpredictable IRQ is of course sampled for entropy */
329 -       rand_initialize_irq(client->irq);
330 -
331         if (err)
332                 goto exit_no_irq;
333  
334 --- a/drivers/mfd/tps65010.c
335 +++ b/drivers/mfd/tps65010.c
336 @@ -563,8 +563,7 @@ static int tps65010_probe(struct i2c_cli
337          */
338         if (client->irq > 0) {
339                 status = request_irq(client->irq, tps65010_irq,
340 -                       IRQF_SAMPLE_RANDOM | IRQF_TRIGGER_FALLING,
341 -                       DRIVER_NAME, tps);
342 +                       IRQF_TRIGGER_FALLING, DRIVER_NAME, tps);
343                 if (status < 0) {
344                         dev_dbg(&client->dev, "can't get IRQ %d, err %d\n",
345                                         client->irq, status);
346 --- a/drivers/net/ethernet/broadcom/tg3.c
347 +++ b/drivers/net/ethernet/broadcom/tg3.c
348 @@ -9415,7 +9415,7 @@ static int tg3_test_interrupt(struct tg3
349         }
350  
351         err = request_irq(tnapi->irq_vec, tg3_test_isr,
352 -                         IRQF_SHARED | IRQF_SAMPLE_RANDOM, dev->name, tnapi);
353 +                         IRQF_SHARED, dev->name, tnapi);
354         if (err)
355                 return err;
356  
357 --- a/drivers/power/pda_power.c
358 +++ b/drivers/power/pda_power.c
359 @@ -24,11 +24,7 @@
360  
361  static inline unsigned int get_irq_flags(struct resource *res)
362  {
363 -       unsigned int flags = IRQF_SAMPLE_RANDOM | IRQF_SHARED;
364 -
365 -       flags |= res->flags & IRQF_TRIGGER_MASK;
366 -
367 -       return flags;
368 +       return IRQF_SHARED | (res->flags & IRQF_TRIGGER_MASK);
369  }
370  
371  static struct device *dev;
372 --- a/drivers/tty/serial/uartlite.c
373 +++ b/drivers/tty/serial/uartlite.c
374 @@ -216,8 +216,7 @@ static int ulite_startup(struct uart_por
375  {
376         int ret;
377  
378 -       ret = request_irq(port->irq, ulite_isr,
379 -                         IRQF_SHARED | IRQF_SAMPLE_RANDOM, "uartlite", port);
380 +       ret = request_irq(port->irq, ulite_isr, IRQF_SHARED, "uartlite", port);
381         if (ret)
382                 return ret;
383  
384 --- a/drivers/usb/gadget/goku_udc.c
385 +++ b/drivers/usb/gadget/goku_udc.c
386 @@ -1839,7 +1839,7 @@ static int goku_probe(struct pci_dev *pd
387         /* init to known state, then setup irqs */
388         udc_reset(dev);
389         udc_reinit (dev);
390 -       if (request_irq(pdev->irq, goku_irq, IRQF_SHARED/*|IRQF_SAMPLE_RANDOM*/,
391 +       if (request_irq(pdev->irq, goku_irq, IRQF_SHARED,
392                         driver_name, dev) != 0) {
393                 DBG(dev, "request interrupt %d failed\n", pdev->irq);
394                 retval = -EBUSY;
395 --- a/drivers/usb/gadget/omap_udc.c
396 +++ b/drivers/usb/gadget/omap_udc.c
397 @@ -2943,7 +2943,7 @@ known:
398  
399         /* USB general purpose IRQ:  ep0, state changes, dma, etc */
400         status = request_irq(pdev->resource[1].start, omap_udc_irq,
401 -                       IRQF_SAMPLE_RANDOM, driver_name, udc);
402 +                            0, driver_name, udc);
403         if (status != 0) {
404                 ERR("can't get irq %d, err %d\n",
405                         (int) pdev->resource[1].start, status);
406 @@ -2952,7 +2952,7 @@ known:
407  
408         /* USB "non-iso" IRQ (PIO for all but ep0) */
409         status = request_irq(pdev->resource[2].start, omap_udc_pio_irq,
410 -                       IRQF_SAMPLE_RANDOM, "omap_udc pio", udc);
411 +                            0, "omap_udc pio", udc);
412         if (status != 0) {
413                 ERR("can't get irq %d, err %d\n",
414                         (int) pdev->resource[2].start, status);
415 --- a/drivers/usb/gadget/pxa25x_udc.c
416 +++ b/drivers/usb/gadget/pxa25x_udc.c
417 @@ -2202,19 +2202,15 @@ static int __init pxa25x_udc_probe(struc
418  
419  #ifdef CONFIG_ARCH_LUBBOCK
420         if (machine_is_lubbock()) {
421 -               retval = request_irq(LUBBOCK_USB_DISC_IRQ,
422 -                               lubbock_vbus_irq,
423 -                               IRQF_SAMPLE_RANDOM,
424 -                               driver_name, dev);
425 +               retval = request_irq(LUBBOCK_USB_DISC_IRQ, lubbock_vbus_irq,
426 +                                    0, driver_name, dev);
427                 if (retval != 0) {
428                         pr_err("%s: can't get irq %i, err %d\n",
429                                 driver_name, LUBBOCK_USB_DISC_IRQ, retval);
430                         goto err_irq_lub;
431                 }
432 -               retval = request_irq(LUBBOCK_USB_IRQ,
433 -                               lubbock_vbus_irq,
434 -                               IRQF_SAMPLE_RANDOM,
435 -                               driver_name, dev);
436 +               retval = request_irq(LUBBOCK_USB_IRQ, lubbock_vbus_irq,
437 +                                    0, driver_name, dev);
438                 if (retval != 0) {
439                         pr_err("%s: can't get irq %i, err %d\n",
440                                 driver_name, LUBBOCK_USB_IRQ, retval);
441 --- a/drivers/usb/otg/gpio_vbus.c
442 +++ b/drivers/usb/otg/gpio_vbus.c
443 @@ -51,8 +51,7 @@ struct gpio_vbus_data {
444   * edges might be workable.
445   */
446  #define VBUS_IRQ_FLAGS \
447 -       ( IRQF_SAMPLE_RANDOM | IRQF_SHARED \
448 -       | IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING )
449 +       ( IRQF_SHARED | IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING )
450  
451  
452  /* interface to regulator framework */
453 @@ -253,7 +252,7 @@ static int __init gpio_vbus_probe(struct
454         if (res) {
455                 irq = res->start;
456                 res->flags &= IRQF_TRIGGER_MASK;
457 -               res->flags |= IRQF_SAMPLE_RANDOM | IRQF_SHARED;
458 +               res->flags |= IRQF_SHARED;
459         } else
460                 irq = gpio_to_irq(gpio);
461  
462 --- a/drivers/usb/otg/isp1301_omap.c
463 +++ b/drivers/usb/otg/isp1301_omap.c
464 @@ -1567,7 +1567,6 @@ isp1301_probe(struct i2c_client *i2c, co
465                 isp->irq_type = IRQF_TRIGGER_FALLING;
466         }
467  
468 -       isp->irq_type |= IRQF_SAMPLE_RANDOM;
469         status = request_irq(i2c->irq, isp1301_irq,
470                         isp->irq_type, DRIVER_NAME, isp);
471         if (status < 0) {
472 --- a/include/linux/interrupt.h
473 +++ b/include/linux/interrupt.h
474 @@ -44,7 +44,6 @@
475   *
476   * IRQF_DISABLED - keep irqs disabled when calling the action handler.
477   *                 DEPRECATED. This flag is a NOOP and scheduled to be removed
478 - * IRQF_SAMPLE_RANDOM - irq is used to feed the random generator
479   * IRQF_SHARED - allow sharing the irq among several devices
480   * IRQF_PROBE_SHARED - set by callers when they expect sharing mismatches to occur
481   * IRQF_TIMER - Flag to mark this interrupt as timer interrupt
482 @@ -63,7 +62,6 @@
483   *                resume time.
484   */
485  #define IRQF_DISABLED          0x00000020
486 -#define IRQF_SAMPLE_RANDOM     0x00000040
487  #define IRQF_SHARED            0x00000080
488  #define IRQF_PROBE_SHARED      0x00000100
489  #define __IRQF_TIMER           0x00000200
490 --- a/include/linux/irqdesc.h
491 +++ b/include/linux/irqdesc.h
492 @@ -39,7 +39,6 @@ struct module;
493   */
494  struct irq_desc {
495         struct irq_data         irq_data;
496 -       struct timer_rand_state *timer_rand_state;
497         unsigned int __percpu   *kstat_irqs;
498         irq_flow_handler_t      handle_irq;
499  #ifdef CONFIG_IRQ_PREFLOW_FASTEOI
500 --- a/include/linux/random.h
501 +++ b/include/linux/random.h
502 @@ -48,8 +48,6 @@ struct rnd_state {
503  
504  #ifdef __KERNEL__
505  
506 -extern void rand_initialize_irq(int irq);
507 -
508  extern void add_device_randomness(const void *, unsigned int);
509  extern void add_input_randomness(unsigned int type, unsigned int code,
510                                  unsigned int value);
511 --- a/kernel/irq/manage.c
512 +++ b/kernel/irq/manage.c
513 @@ -891,22 +891,6 @@ __setup_irq(unsigned int irq, struct irq
514                 return -ENOSYS;
515         if (!try_module_get(desc->owner))
516                 return -ENODEV;
517 -       /*
518 -        * Some drivers like serial.c use request_irq() heavily,
519 -        * so we have to be careful not to interfere with a
520 -        * running system.
521 -        */
522 -       if (new->flags & IRQF_SAMPLE_RANDOM) {
523 -               /*
524 -                * This function might sleep, we want to call it first,
525 -                * outside of the atomic block.
526 -                * Yes, this might clear the entropy pool if the wrong
527 -                * driver is attempted to be loaded, without actually
528 -                * installing a new handler, but is this really a problem,
529 -                * only the sysadmin is able to do this.
530 -                */
531 -               rand_initialize_irq(irq);
532 -       }
533  
534         /*
535          * Check whether the interrupt nests into another interrupt
536 @@ -1342,7 +1326,6 @@ EXPORT_SYMBOL(free_irq);
537   *     Flags:
538   *
539   *     IRQF_SHARED             Interrupt is shared
540 - *     IRQF_SAMPLE_RANDOM      The interrupt can be used for entropy
541   *     IRQF_TRIGGER_*          Specify active edge(s) or level
542   *
543   */