hw_random: provide more information when driver loads
PATCH 1/1 hw_random: provide more information when driver loads
This patch makes the hw_random driver a little more informative when it is starting up - currently, there is no easy way to tell if the driver detected any hardware.
The AMD driver does mention that it found the chip - this adds the same for the VIA and Intel sections of the driver.
Tested with an i810-equipped system.
Signed-off-by James Nelson <[email protected]>
drivers/char/hw_random.c +6 -2
@@ -248,6 +249,7 @@ static int __init intel_init (struct pci goto err_out_free_map; } +pr_info (PFX "Intel i810 RNG enabled\n" );DPRINTK ("EXIT, returning 0\n" );return 0 ;
@@ -451,6 +453,8 @@ static int __init via_init(struct pci_dereturn -ENODEV ; } +pr_info (PFX "VIA C3 RNG enabled\n" ); +return 0 ; }
@@ -577,6 +581,8 @@ static int __init rng_init (void)DPRINTK ("ENTER\n" ); +pr_info (RNG_DRIVER_NAME "\n" ); +/* Probe for Intel, AMD RNGs */ for_each_pci_dev (pdev) { ent =pci_match_device (rng_pci_tbl, pdev);
@@ -595,6 +601,7 @@ static int __init rng_init (void) }#endif + printk (KERN_ERR PFX "no supported hardware RNGs found\n");DPRINTK ("EXIT, returning -ENODEV\n" );return -ENODEV ;
@@ -603,8 +610,6 @@ match:if (rc)return rc; -pr_info (RNG_DRIVER_NAME " loaded\n" ); -DPRINTK ("EXIT, returning 0\n" );return 0 ; }