Final answer:
The passages are an example of foreshadowing.
Step-by-step explanation:
The literary device used in the given passages from Washington Irving's The Devil and Tom Walker is foreshadowing. Foreshadowing is a technique used by authors to hint at future events or outcomes in a story. In this case, Tom's loss of patience and piety foreshadows negative consequences, which are further hinted at with the three loud knocks at the street door.
Learn more about Foreshadowing in literature