tpm: clean up empty lines in .c and .h files
This commit is contained in:
parent
93a6b43939
commit
0d7f4d16dd
@ -146,7 +146,6 @@ __FBSDID("$FreeBSD$");
|
|||||||
/* Set when enabling legacy interface in host bridge. */
|
/* Set when enabling legacy interface in host bridge. */
|
||||||
int tpm_enabled;
|
int tpm_enabled;
|
||||||
|
|
||||||
|
|
||||||
#ifdef __FreeBSD__
|
#ifdef __FreeBSD__
|
||||||
#define TPMSOFTC(dev) \
|
#define TPMSOFTC(dev) \
|
||||||
((struct tpm_softc *)dev->si_drv1)
|
((struct tpm_softc *)dev->si_drv1)
|
||||||
@ -244,7 +243,6 @@ tpm_identify(driver_t *driver, device_t parent)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
int
|
int
|
||||||
tpm_attach(device_t dev)
|
tpm_attach(device_t dev)
|
||||||
{
|
{
|
||||||
@ -270,7 +268,7 @@ tpm_attach(device_t dev)
|
|||||||
|
|
||||||
/* In case PnP probe this may contain some initialization. */
|
/* In case PnP probe this may contain some initialization. */
|
||||||
tpm_tis12_probe(sc->sc_bt, sc->sc_bh);
|
tpm_tis12_probe(sc->sc_bt, sc->sc_bh);
|
||||||
|
|
||||||
if (tpm_legacy_probe(sc->sc_bt, sc->sc_bh)) {
|
if (tpm_legacy_probe(sc->sc_bt, sc->sc_bh)) {
|
||||||
sc->sc_init = tpm_legacy_init;
|
sc->sc_init = tpm_legacy_init;
|
||||||
sc->sc_start = tpm_legacy_start;
|
sc->sc_start = tpm_legacy_start;
|
||||||
@ -331,7 +329,6 @@ tpm_detach(device_t dev)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#else
|
#else
|
||||||
/*
|
/*
|
||||||
* OpenBSD specific code for probing and attaching TPM to device tree.
|
* OpenBSD specific code for probing and attaching TPM to device tree.
|
||||||
|
@ -177,7 +177,6 @@ tpm20_close(struct cdev *dev, int flag, int mode, struct thread *td)
|
|||||||
return (0);
|
return (0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int
|
int
|
||||||
tpm20_ioctl(struct cdev *dev, u_long cmd, caddr_t data,
|
tpm20_ioctl(struct cdev *dev, u_long cmd, caddr_t data,
|
||||||
int flags, struct thread *td)
|
int flags, struct thread *td)
|
||||||
@ -234,7 +233,6 @@ tpm20_release(struct tpm_sc *sc)
|
|||||||
destroy_dev(sc->sc_cdev);
|
destroy_dev(sc->sc_cdev);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int
|
int
|
||||||
tpm20_suspend(device_t dev)
|
tpm20_suspend(device_t dev)
|
||||||
{
|
{
|
||||||
@ -267,7 +265,6 @@ tpm20_harvest(void *arg)
|
|||||||
0x00, TPM_HARVEST_SIZE /* number of bytes requested */
|
0x00, TPM_HARVEST_SIZE /* number of bytes requested */
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
sc = arg;
|
sc = arg;
|
||||||
sx_xlock(&sc->dev_lock);
|
sx_xlock(&sc->dev_lock);
|
||||||
while (sc->pending_data_length != 0)
|
while (sc->pending_data_length != 0)
|
||||||
|
@ -95,7 +95,6 @@ __FBSDID("$FreeBSD$");
|
|||||||
#define TPM_CDEV_NAME "tpm0"
|
#define TPM_CDEV_NAME "tpm0"
|
||||||
#define TPM_CDEV_PERM_FLAG 0600
|
#define TPM_CDEV_PERM_FLAG 0600
|
||||||
|
|
||||||
|
|
||||||
#define TPM2_START_METHOD_ACPI 2
|
#define TPM2_START_METHOD_ACPI 2
|
||||||
#define TPM2_START_METHOD_TIS 6
|
#define TPM2_START_METHOD_TIS 6
|
||||||
#define TPM2_START_METHOD_CRB 7
|
#define TPM2_START_METHOD_CRB 7
|
||||||
|
@ -44,8 +44,6 @@ __FBSDID("$FreeBSD$");
|
|||||||
#include <contrib/dev/acpica/include/accommon.h>
|
#include <contrib/dev/acpica/include/accommon.h>
|
||||||
#include <dev/acpica/acpivar.h>
|
#include <dev/acpica/acpivar.h>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
char *tpm_ids[] = {"ATM1200", "BCM0102", "INTC0102", "SNO3504", "WEC1000",
|
char *tpm_ids[] = {"ATM1200", "BCM0102", "INTC0102", "SNO3504", "WEC1000",
|
||||||
"PNP0C31", NULL};
|
"PNP0C31", NULL};
|
||||||
|
|
||||||
@ -53,7 +51,7 @@ static int
|
|||||||
tpm_acpi_probe(device_t dev)
|
tpm_acpi_probe(device_t dev)
|
||||||
{
|
{
|
||||||
int rv;
|
int rv;
|
||||||
|
|
||||||
rv = ACPI_ID_PROBE(device_get_parent(dev), dev, tpm_ids, NULL);
|
rv = ACPI_ID_PROBE(device_get_parent(dev), dev, tpm_ids, NULL);
|
||||||
if (rv <= 0)
|
if (rv <= 0)
|
||||||
device_set_desc(dev, "Trusted Platform Module");
|
device_set_desc(dev, "Trusted Platform Module");
|
||||||
|
@ -85,7 +85,6 @@ struct tpmcrb_sc {
|
|||||||
size_t rsp_buf_size;
|
size_t rsp_buf_size;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
int tpmcrb_transmit(struct tpm_sc *sc, size_t size);
|
int tpmcrb_transmit(struct tpm_sc *sc, size_t size);
|
||||||
|
|
||||||
static int tpmcrb_acpi_probe(device_t dev);
|
static int tpmcrb_acpi_probe(device_t dev);
|
||||||
|
@ -331,7 +331,6 @@ tpmtis_write_bytes(struct tpm_sc *sc, size_t count, uint8_t *buf)
|
|||||||
return (true);
|
return (true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static bool
|
static bool
|
||||||
tpmtis_request_locality(struct tpm_sc *sc, int locality)
|
tpmtis_request_locality(struct tpm_sc *sc, int locality)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user