node-drivers/base-driver/drivers/vca/plx87xx/plx_main.c
static int plx_register_deffered_hs(struct plx_device *xdev)
{
	int db;
	int rc;
	dev_err(&xdev->pdev->dev,
		"Deffer registration until Handshake with the other side done\n");

	plx_deffered_hs_thread = kthread_create(plx_deffered_hs_thread_fn,
		(void *) xdev, "PLX deffered HS thread");
	if(IS_ERR(plx_deffered_hs_thread)) {
		dev_err(&xdev->pdev->dev,
			"Couldn't register deffered handshake thread\n");
		rc = PTR_ERR(plx_deffered_hs_thread);
		goto exit;
	}

	db = plx_next_db(xdev);
	xdev->hs_irq = plx_request_threaded_irq(xdev, NULL, plx_deffered_rdp_init,
		"handshake", xdev, db);
	if(IS_ERR(xdev->hs_irq)) {
		rc = PTR_ERR(xdev->hs_irq);
		dev_err(&xdev->pdev->dev,
			"Couldn't register IRQ for deffered handshake, rc %d\n", rc);
		kthread_stop(plx_deffered_hs_thread);
		goto exit;
	}

	plx_write_spad(xdev, PLX_HSDB_SPAD,
		(PLX_HSDB_CMD << PLX_HSDB_SHIFT) | (db & ~PLX_HSDB_MASK));
	dev_info(&xdev->pdev->dev, "Registered deffered Handshake on IRQ %d\n", db);
	rc = 0;

exit:
	return rc;
}
/**
 * plx_register_deffered_hs - register deffered handhake handler and irq
 * @xdev: pointer to plx_device instance
 *
 * returns 0 on success, < 0 on failure.
 */
register deffered handhake handler and irq
@xdev: pointer to plx_device instance

returns 0 on success, < 0 on failure.
register deffered handhake handler and irq @xdev : pointer to plx_device instance returns 0 on success < 0 on failure .
static int plx_register_deffered_hs(struct plx_device *xdev)
{
	int db;
	int rc;
	dev_err(&xdev->pdev->dev,
		"Deffer registration until Handshake with the other side done\n");
	plx_deffered_hs_thread = kthread_create(plx_deffered_hs_thread_fn,
		(void *) xdev, "PLX deffered HS thread");
	if(IS_ERR(plx_deffered_hs_thread)) {
		dev_err(&xdev->pdev->dev,
			"Couldn't register deffered handshake thread\n");
		rc = PTR_ERR(plx_deffered_hs_thread);
		goto exit;
	}
	db = plx_next_db(xdev);
	xdev->hs_irq = plx_request_threaded_irq(xdev, NULL, plx_deffered_rdp_init,
		"handshake", xdev, db);
	if(IS_ERR(xdev->hs_irq)) {
		rc = PTR_ERR(xdev->hs_irq);
		dev_err(&xdev->pdev->dev,
			"Couldn't register IRQ for deffered handshake, rc %d\n", rc);
		kthread_stop(plx_deffered_hs_thread);
		goto exit;
	}
	plx_write_spad(xdev, PLX_HSDB_SPAD,
		(PLX_HSDB_CMD << PLX_HSDB_SHIFT) | (db & ~PLX_HSDB_MASK));
	dev_info(&xdev->pdev->dev, "Registered deffered Handshake on IRQ %d\n", db);
	rc = 0;
exit:
	return rc;
}
static int plx_register_deffered_hs ( struct plx_device * xdev ) { int db ; int rc ; dev_err ( & xdev -> pdev -> dev , " \n " ) ; plx_deffered_hs_thread = kthread_create ( plx_deffered_hs_thread_fn , ( void * ) xdev , " " ) ; if ( IS_ERR ( plx_deffered_hs_thread ) ) { dev_err ( & xdev -> pdev -> dev , " \n " ) ; rc = PTR_ERR ( plx_deffered_hs_thread ) ; goto exit ; } db = plx_next_db ( xdev ) ; xdev -> hs_irq = plx_request_threaded_irq ( xdev , NULL , plx_deffered_rdp_init , " " , xdev , db ) ; if ( IS_ERR ( xdev -> hs_irq ) ) { rc = PTR_ERR ( xdev -> hs_irq ) ; dev_err ( & xdev -> pdev -> dev , " \n " , rc ) ; kthread_stop ( plx_deffered_hs_thread ) ; goto exit ; } plx_write_spad ( xdev , PLX_HSDB_SPAD , ( PLX_HSDB_CMD << PLX_HSDB_SHIFT ) | ( db & ~ PLX_HSDB_MASK ) ) ; dev_info ( & xdev -> pdev -> dev , " \n " , db ) ; rc = 0 ; exit : return rc ; }
plx_register_deffered_hs - register deffered handhake handler and irq
 @xdev: pointer to plx_device instance
plx_register_deffered_hs - register deffered handhake handler and irq @xdev : pointer to plx_device instance